home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / c / tcxl551.zip / TCXL_DOC.EXE / lha / DOC / TCXL-USE.TXT < prev   
Text File  |  1990-10-01  |  158KB  |  4,186 lines

  1.  
  2.  
  3.             The TesSeRact CXL User Interface Development System
  4.  
  5.  
  6.                        Installation and User's Guide
  7.  
  8.  
  9.                       Version 5.51 -- October 1, 1990
  10.  
  11.  
  12.      Copyright 1990, Innovative Data Concepts
  13.      All Rights Reserved
  14.  
  15.  
  16.      Innovative Data Concepts
  17.      1657 The Fairways
  18.      Suite 101
  19.      Jenkintown, PA 19046
  20.      Voice:  1-215-884-3373
  21.      Orders: 1-800-926-4551
  22.      FAX:    1-215-886-4225
  23.  
  24.  
  25.  
  26. TCXL is  part of  IDC's TesSeRact  Development Tools series of programmer's
  27. products.
  28.  
  29.  
  30.                              Acknowledgements
  31.  
  32. Thanks to my loving wife Anne Marie, without whom life would be nothing.
  33.  
  34. A very special thanks to Tina, who keeps this place running.
  35.  
  36. And we  can't forget  Michael Mohle',  who slaved over the code and made it
  37. all work.
  38.  
  39. Without beta testers, where are we in this business?  I've had a great crew
  40. for TCXL,  much too  numerous to  mention individually.   But a few deserve
  41. extra kudos:
  42.      Doug MacLean, who selflessly gave his time and effort as needed.
  43.      Dave Seidel,  who found  more critters  than we  wanted  him  to,  and
  44.           received the "Golden Cockroach" award for his trouble.
  45.      Ed Mulroy, who called at ungodly hours while writing batch files.
  46.      Peter Schultz,  for requesting  enhancements, providing  the code  for
  47.           them, and  then reporting  bugs in the way they worked because he
  48.           changed his mind!
  49.      Mike Burns,  for finding  a few  problems that were causing us to lose
  50.           our hair.
  51.      And we  must mention  Gary Weinfurther,  who kept finding those little
  52.           gnats even after we thought the code was finished.
  53.      And all the rest .....
  54.  
  55. Thanks, everyone!
  56. This  document;   other  accompanying  written  and  disk-based  notes  and
  57. specifications; and  all referenced  and related program files accompanying
  58. this document  are copyrighted  by Innovative  Data Concepts.  For ordering
  59. information, see  the ORDER.DOC  file provided  with  this  package.    For
  60. shareware distribution requirements, see the VENDOR.DOC file.
  61.  
  62.  
  63.  
  64.  
  65.  
  66.                   _______
  67.              ____|__     |               (R)
  68.           --|       |    |-------------------
  69.             |   ____|__  |  Association of
  70.             |  |       |_|  Shareware
  71.             |__|   o   |    Professionals
  72.           -----|   |   |---------------------
  73.                |___|___|    MEMBER
  74.  
  75.  
  76. The TesSeRact  Development Tools are distributed as shareware -- this means
  77. that we  encourage users,  subject to restrictions described in the License
  78. Agreement, to  share copies  of this  program with  friends, associates and
  79. bulletin boards.  You may not share the registered version of The TesSeRact
  80. Development Tools;  however, you  may request  a  free  shareware  disk  by
  81. completing the form in VENDOR.DOC.
  82.  
  83. If you make copies of The TesSeRact Development Tools, you must include all
  84. files in  the original  distribution files,  as well  as the  documentation
  85. archive.   You are  not permitted  to distribute  The TesSeRact Development
  86. Tools without this documentation.
  87.  
  88. Innovative Data  Concepts is  a member  of  the  Association  of  Shareware
  89. Professionals.   The  ASP  has  established  stringent  standards  for  its
  90. members.   ASP wants  to make  sure that  the shareware principle works for
  91. you.  If you are unable to resolve a problem with an ASP member (other than
  92. technical support),  ASP may  be able  to help.   Please  write to  the ASP
  93. Ombudsman at P.O. Box 5786, Bellevue, WA 98006.
  94.  
  95.  
  96.                                 Trademarks
  97.  
  98.      SWAPSK, SWAPSP, SWAPTN, SWAPMT, SWAPMM, SWAPSH, SWAPDT, SWAPNG and The
  99.           SWAP Utilities are trademarks of Innovative Data Concepts.
  100.      TesSeRact is a trademark of Innovative Data Concepts
  101.      CompuServe is a registered trademark of CompuServe Incorporated.
  102.      DESQview is a trademark of Quarterdeck Office Systems.
  103.      Epson is a registered trademark of Seiko Epson Corporation.
  104.      IBM is a registered trademark of International Business Machines.
  105.      LIM  and   EMS  are   trademarks  of   Lotus,  Intel,   and  Microsoft
  106.           Corporations.
  107.      Lotus is a registered trademark of Lotus Development Corporation.
  108.      Microsoft is a registered trademark of Microsoft Corporation.
  109.      Turbo C  and   Turbo C++  are   registered   trademarks   of   Borland
  110.           International.
  111.      UltraVision is a trademark of Personics, Inc.
  112.      Zortech is a trademark of Zortech Inc.
  113.  
  114. Page ii                                     TesSeRact CXL V5.5 User's Guide
  115.                              Table of Contents
  116.      Introductory Notes.............................................ii
  117.  General Information.................................................1
  118.      Features Overview...............................................1
  119.      Supported Standards.............................................3
  120.      New in Version 5.5..............................................3
  121.  Technical Support...................................................3
  122.      Bug Fixes, Updates, Etc.........................................4
  123.  About Innovative Data Concepts......................................4
  124.      IDC Products....................................................5
  125.  Installation........................................................6
  126.  Converting Your Code From CXL 5.x...................................7
  127.  The TCXL Tools......................................................8
  128.  Using Library Functions............................................11
  129.      Compiling and Linking..........................................12
  130.      Library Organization...........................................13
  131.      Future Planning................................................14
  132.  Using the TCXL Systems.............................................14
  133.      OverView.......................................................14
  134.      Menu System....................................................15
  135.      Entry System...................................................17
  136.          Using Format Control Characters............................20
  137.      Help System....................................................20
  138.          Building Help Files........................................22
  139.      Selection System...............................................23
  140.      Window System..................................................23
  141.      Display System.................................................24
  142.      Input System...................................................24
  143.      Strings System.................................................24
  144.      Information Subsystem..........................................24
  145.      Memory Subsystem...............................................24
  146.      Printer Subsystem..............................................25
  147.      OpSys Subsystem................................................25
  148.      Video Access Subsystem.........................................25
  149.      Keyboard Access Subsystem......................................26
  150.      Mouse Access Subsystem.........................................26
  151.      Conversion Subsystem...........................................26
  152.      Format Control Subsystem.......................................26
  153.      Near/Far Subsystem.............................................26
  154.  Header File Descriptions...........................................27
  155.      C Header Files.................................................27
  156.      Assembler Include Files........................................27
  157.  Predefined Types...................................................28
  158.      Portability and Shorthand Notation.............................28
  159.      Standard Object, Pointer and Indirect Types....................29
  160.      TCXL-specific type-aliases.....................................30
  161.      Common Function Pointer Types..................................30
  162.  Structures, Unions and Typedefs....................................30
  163.      Menu System....................................................31
  164.              Mctl...................................................31
  165.              Idf....................................................32
  166.              Mdf....................................................33
  167.      Entry System...................................................34
  168.              Fdf....................................................34
  169.              Edf....................................................35
  170.      Help System....................................................35
  171.              Hctl...................................................36
  172.  
  173. TesSeRact CXL V5.5 User's Guide                                    Page iii
  174.      Window System..................................................36
  175.              Box....................................................36
  176.              Ttl....................................................37
  177.              Wdf....................................................37
  178.              Wctl...................................................38
  179.      Information Subsystem..........................................38
  180.              Hdw....................................................38
  181.              Tcxl...................................................39
  182.      Memory Subsystem...............................................40
  183.              _Mem...................................................40
  184.      OpSys Subsystem................................................41
  185.              Ffb....................................................41
  186.      Video Access Subsystem.........................................41
  187.              Vcel...................................................41
  188.              Vcse...................................................42
  189.              Vpos...................................................42
  190.              Vctl...................................................43
  191.      Keyboard Access Subsystem......................................43
  192.              Kcod...................................................43
  193.              Kbnd...................................................44
  194.              Kctl...................................................44
  195.      Mouse Access Subsystem.........................................45
  196.              Mou....................................................45
  197.      Format Control Subsystem.......................................46
  198.              Fmt....................................................46
  199.  Control Structures and Macros......................................46
  200.      Menu System....................................................47
  201.              _MnuCtl................................................47
  202.      Entry System...................................................49
  203.              _EntCtl................................................49
  204.      Selection System...............................................51
  205.              SelPtr.................................................51
  206.              SelNdx.................................................51
  207.      Help System....................................................51
  208.              _HlpCtl................................................51
  209.      Window System..................................................52
  210.              _WinCtl................................................52
  211.      Information Subsystem..........................................54
  212.              _HdwCtl................................................54
  213.              _TcxlCtl...............................................55
  214.      Memory Subsystem...............................................56
  215.              _MemCtl................................................56
  216.      Printer Subsystem..............................................59
  217.              Printer................................................59
  218.      OpSys Subsystem................................................59
  219.              OpSys..................................................59
  220.      Video Access Subsystem.........................................60
  221.              _VidCtl................................................60
  222.      Keyboard Access Subsystem......................................63
  223.              _KeyCtl................................................63
  224.              _KeyQue................................................63
  225.      Mouse Access Subsystem.........................................64
  226.              _MouCtl................................................64
  227.      Format Control Subsystem.......................................65
  228.              _FmtCtl................................................65
  229.  COPYRIGHT NOTICE AND LICENSE.......................................67
  230.      Warranty.......................................................67
  231.  
  232. Page iv                                     TesSeRact CXL V5.5 User's Guide
  233.  
  234.  
  235.                             General Information
  236.  
  237. The TCXL  library is  intended to  be a  supplement to  your  C  compiler's
  238. standard run-time  library.   It contains  over 375 multi-purpose functions
  239. which provide  a variety  of capabilities.   It  is available  for  several
  240. popular C compilers including Microsoft C, QuickC, Turbo C/C++, and Zortech
  241. C/C++.   These routines  were written  in highly-optimized  C and assembler
  242. code  ensuring   maximum  program   speed,  minimum   program  size,   easy
  243. modification, and increased portability.
  244.  
  245.  
  246.                              Features Overview
  247.  
  248.   o    Custmized Bar Menus.
  249.        You can  easily create  pop-up, pull-down, and Lotus-style menus,
  250.        as well  as any  other custom menu that you can define.  Features
  251.        full mouse  support, nonselectable  items, global  hot keys,  and
  252.        more.
  253.  
  254.   o    Multi-Field Formatted Data Entry.
  255.        You can create data entry forms that consist of one or more input
  256.        fields.   You have  full control  over user  input  and  can  tie
  257.        validation functions  into each  input field.  Features alpha and
  258.        numeric  justification,   capitalization  conversion,  formatting
  259.        characters, and a large assortment of editing keys.  You may also
  260.        tie each  field to  a hot-key,  and move  between fields  using a
  261.        mouse.
  262.  
  263.   o    Context-Sensitive Help.
  264.        Help files  are indexed  for speed  and categories  can be cross-
  265.        referenced.   Help can  be applied  at the  global, window,  menu
  266.        item, and input field levels.
  267.  
  268.   o    Powerful Selection Capabilities.
  269.        TCXL has  scrollable pick  menus, that allow you to pick one item
  270.        from a  list of  items.   Features full  mouse support and scroll
  271.        bars.   There is  also a  dedicated file  picker that  uses  this
  272.        feature to let you pick from a list of files, very similar to the
  273.        way that  the Turbo C and QuickC environments' file pickers work,
  274.        and a built-in video attribute selector.
  275.  
  276.   o    Full-Featured Window Control
  277.        Allows as  many open  windows as  memory permits.  Windows can be
  278.        stacked, tiled,  shadowed, moved,  resized, and  changed in  many
  279.        other ways.   There are more than 75 functions designed to handle
  280.        windowed output.
  281.  
  282.   o    User-defined Input Features
  283.        TCXL's Input  System provides  a consistent interface between the
  284.        hardware-dependent input devices and TCXL's output systems.  This
  285.        system features  both formatted  and unformatted user input, with
  286.        varying levels of output control.
  287.  
  288.  
  289.  
  290.  
  291. TesSeRact CXL V5.5 User's Guide                                      Page 1
  292.   o    Hardware-Independent Display Control
  293.        By separating  the display  from the  video hardware, TCXL allows
  294.        the programmer  direct control  of  the  display  without  device
  295.        dependence.   TCXL comes  with several  output methods  built-in,
  296.        including direct  screen writing,  direct screen writing with CGA
  297.        snow elimination,  and  video  BIOS  writes.    Support  for  the
  298.        DESQview/Windows/TopView  interface  is  automatic  when  writing
  299.        direct to the video buffer areas.
  300.  
  301.   o    Nonstandard Video Sizes
  302.        EGA 43  and VGA  50-line  modes  are  fully  supported  and  TCXL
  303.        provides functions  to directly  change to  and from these modes.
  304.        TCXL's video functions are also compatible with nonstandard modes
  305.        such as 132x25 and 120x43.
  306.  
  307.   o    Advanced String Manipulation
  308.        There are  nearly 40  string manipulation  functions that perform
  309.        searching, replacing, formatting, conversion, rotating, shifting,
  310.        pattern matching, and other string operations.
  311.  
  312.   o    Automatic Mouse Support
  313.        If  you   write  your   program  using   TCXL,  the   mouse  will
  314.        automatically be  enabled in  Menus, Entry  Forms  and  Selection
  315.        lists.   No programmer  knowledge  or  manipulation  of  mice  is
  316.        necessary!   For those  whose applications  require  more  direct
  317.        mouse control,  TCXL  can  have  button-presses  translated  into
  318.        keystrokes and  movements into  arrow keys.   Low-level functions
  319.        are provided for directly manipulating Microsoft-compatible mice,
  320.        and TCXL supports both two and three-button mice.
  321.  
  322.   o    Keyboard Management
  323.        Allows both  high and low-level control over the keyboard.  There
  324.        are function  for manipulating  the internal input queue, as well
  325.        as for manipulating the BIOS hardware options.
  326.  
  327.   o    Expanded/Extended Memory
  328.        TCXL has  a full  set of  routines for  accessing Expanded Memory
  329.        through tre  EMS specification, and for accessing Extended Memory
  330.        through the  XMS specification.   TCXL  will also  regognize  the
  331.        presence of  advanced memory  management schemes such as VCPI and
  332.        DPMI.
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350. Page 2                                      TesSeRact CXL V5.5 User's Guide
  351.                             Supported Standards
  352.  
  353. TCXL  supports  all  the  current  memory  management  standards  currently
  354. available.   This includes  the DOS  Protected Mode Interface Specification
  355. (DPMI) Version  0.9, the  Virtual Control  Program Interface (VCPI) Version
  356. 1.0, the  eXtended Memory Specification (XMS) Version 2.0, and the Expanded
  357. Memory Specification (EMS) Version 4.0.  Details about these four standards
  358. are discussed in the chapter about the Memory Subsystem.
  359.  
  360. In addition,  TCXL provides  direct support  for Personics' UltraVision(TM)
  361. program.   Ultravision is an EGA/VGA video control program with support for
  362. multiple screen  fonts, multiple  screen sizes and higher resolution.  TCXL
  363. will automatically  detect the  presence of  UltraVision, and provides low-
  364. level routines  to manipulate  the size of the video display (See Page 26).
  365. For more information about Ultravision, call Personics at 1-800-445-3311 or
  366. 1-508-897-1575.
  367.                             New in Version 5.5
  368.  
  369.   o    eXtended Memory  Specification (XMS) support, including access to
  370.        Upper Memory Blocks (UMBs) and the High Memory Area (HMA).
  371.  
  372.   o    UltraVision(TM) support.
  373.  
  374.   o    Enhanced mouse support.
  375.  
  376.   o    New Entry  System fields,  including floating  point numberic and
  377.        currency.
  378.  
  379.   o    Hardware-dependent routines  rewritten in  assembler for size and
  380.        speed.
  381.  
  382.   o    Standardized Function naming conventions.
  383.  
  384.   o    Discrete  hardware-level   subsystems  that   allow  for   future
  385.        portability.
  386.  
  387.   o    Approximately 75  new functions, plus macros to access all global
  388.        structures and unions, ensuring portability with future releases.
  389.  
  390.  
  391.                              Technical Support
  392.  
  393. The first  stop for  IDC Technical  Support is CompuServe.  Innovative Data
  394. Concepts has  a support conference on the PCVENC forum, in Subtopic 6.  All
  395. IDC shareware  products are  available for download from CompuServe in this
  396. library, and technical support is available in the message section.
  397.  
  398. The next  stop are the BBS networks.  IDC maintains a support conference on
  399. RIME/RelayNet, and  is active  in the  C Language  Conference.  If you have
  400. access to  FidoNet, you  can find  us in  the C Echo, as well as in the CXL
  401. Echo.   On InterLink, we can be found in the C Language Conference, as well
  402. as on our soon-to-be-opened IDC conference.
  403.  
  404. If you have access to MCIMAIL, we can be reached at 315-5415.
  405.  
  406. If all  else fails,  give us  a call  at 1-215-884-3373.  We'll be happy to
  407. help.
  408.  
  409. TesSeRact CXL V5.5 User's Guide                                      Page 3
  410.  
  411.                          Bug Fixes, Updates, Etc.
  412.  
  413.  
  414. A bug is a bug is a bug.  Anyone who calls it something else is just trying
  415. to hide it.
  416.  
  417. Perfect software  is impossible.   And with a product as complex and varied
  418. as TCXL,  we  don't  expect  to  have  uncovered  everything  (although  we
  419. certainly have tried!).
  420.  
  421. For this  purpose, IDC has set up a network of BBS systems around the world
  422. that are authorized to carry updates/enhancements to our products.  Each of
  423. these boards  will have  a local,  IDC support  conference, and  the  files
  424. available for  download there  will include  all our shareware products, as
  425. well as any updates/enhancements to those products.
  426.  
  427. Source code  fixes and  will be  distributed in  the DFC_DSE  file  format.
  428. These two  programs are  included in  your TCXL  package, and  are normally
  429. placed in  the BIN  directory.   This allows  us to maintain public support
  430. sections around  the world,  without need  for  registration  verification,
  431. while maintaining the integrity of our source code.
  432.  
  433. A current  listing of BBS' carrying the IDC Support Conference is stored in
  434. the BBSLIST.DOC file in your DOC directory.
  435.  
  436.  
  437.                       About Innovative Data Concepts
  438.  
  439. Innovative Data  Concepts is a software publishing firm  owned and operated
  440. by Chip Rabinowitz.  IDC's SWAP Utility product line features products that
  441. make more  efficient use  of your  computer's memory  and other  resources.
  442. IDC's  TesSeRact  Development  Tools  series  focuses  on  programmers  and
  443. application   developers,    giving   them    access    to    high-quality,
  444. memory/resource-efficient developer's tools.
  445.  
  446. Rabinowitz is an Assistant Sysop on the Computer Language Magazine Forum on
  447. CompuServe Information  Service and  also provides  technical  support  for
  448. Borland International  as a  member of  "Team Borland"  on their Compuserve
  449. Forums, in  the areas of Turbo C, Turbo Assembler, Turbo Debugger, SideKick
  450. Plus, Quattro Pro and Paradox.
  451.  
  452. The technology  used by  the SWAP  Utility programs may be applied to other
  453. resident programs.   Developer's  inquires are  welcome.   Innovative  Data
  454. Concepts is currently researching other applications of SWAP technology. If
  455. you have any suggestions/comments, please contact IDC.
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468. Page 4                                      TesSeRact CXL V5.5 User's Guide
  469.                                IDC Products
  470.  
  471.  
  472. The SWAP Utilities . . . make it possible to load many popular TSRs in less
  473. than 8K  of your  precious DOS  memory.   With a "High-DOS" memory manager,
  474. these resident programs require 0K of DOS memory.
  475.  
  476. SWAPDOS .  . . lets you switch between two large applications, keeping your
  477. place in  one while  working in the other.  Swap the first application (and
  478. TSRs) drivers to EMS, XMS or disk, and load another program. Have Microsoft
  479. Word swapped to EMS, while looking at your Lotus 1-2-3 spreadsheet.
  480.  
  481. The TesSeRact  Ram Resident  Development System . . . has been acclaimed by
  482. many to be the standard toolkit for TSR development.  This toolkit provides
  483. developers with  everything needed to create compatible TSRs that are well-
  484. behaved in today's complex environment.
  485.  
  486. And, of course, the TesSeRact CXL User Interface Development System.
  487.  
  488. For complete  price  and  ordering  information,  see  the  ORDER.DOC  file
  489. provided with  this package.   For shareware distribution requirements, see
  490. the VENDOR.DOC file.
  491.  
  492.  
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527. TesSeRact CXL V5.5 User's Guide                                      Page 5
  528.                                Installation
  529.  
  530.  
  531. STEP 1.......BUILD BASE DIRECTORY
  532.  
  533. The Shareware  Version of  the TCXL  User Interface  Development System  is
  534. normally distributed on diskette or in a compressed archive.
  535.  
  536. If you  received a  compressed archive,  either from  a BBS  or from a Disk
  537. Vendor, follow  the instructions  provided to  extract these  files into  a
  538. "\TCXL55" directory.  Then skip to Step 2.
  539.  
  540. If you received a diskette either directly from IDC or from another source,
  541. put the  diskette in  your drive, change to the root directory of the drive
  542. you wish to install TCXL on,  and give the command:
  543.  
  544.   A:COPYTCXL A
  545.  
  546.   or
  547.  
  548.   B:COPYTCXL B
  549.  
  550.  
  551. depending, of  course, on  which drive  you install  from.   COPYTCXL  will
  552. create a  directory called  "\TCXL55", and  will copy  a  series  of  self-
  553. extracting archive files into the directory.
  554.  
  555. In your  TCXL55 directory,  there will  be a file called FILES.CXL.  Verify
  556. that all  the files  described in  FILES.CXL are actually present.  If not,
  557. contact whoever supplied you with your copy of TCXL.
  558.  
  559. Please note  that Innovative Data Concepts normally only provides the small
  560. model libraries  for shareware  distribution.   If you need the large model
  561. libraries to  fully evaluate  the product, contact either IDC or one of our
  562. foreign distributors.   If  you receive  this diskette from IDC, the charge
  563. will be  $5.00 within  the US,  $7.00 in  Canada and  Mexico, and $10.00 to
  564. other locations.   Our  distributors may  have other  pricing  policies  --
  565. contact them for more information.
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586. Page 6                                      TesSeRact CXL V5.5 User's Guide
  587. STEP 2.......RUN START.BAT
  588.  
  589. Once the  files are  in your TCXL55 directory, you are now able to actually
  590. install the  product.   Run the  START.BAT file  that is now in your TCXL55
  591. directory.   This will extract the header files and libraries, and give you
  592. the option to extract the documentation.  All necessary subdirectories will
  593. automatically be created.
  594.  
  595. The libraries  are  are  in  different  directories  depending  upon  which
  596. compiler you are using.  They are listed below with the letter 'x' inserted
  597. to indicate  where the  memory model  should be  ('s','m','c', and  'l' for
  598. small, medium, compact and large respectively).
  599.  
  600.  
  601.                  Compiler        Library
  602.                  ------------------------------------
  603.                  MSC 6           TCXL\M6\TCXLMS6x.LIB
  604.                  QC 2.5          same as above
  605.  
  606.                  MSC 5.1         TCXL\M5\TCXLMS5x.LIB
  607.                  QC before 2.5   same as above
  608.  
  609.                  TC 2 / TC++     TCXL\TC\TCXLTCx.LIB
  610.  
  611.                  Zortech C++     TCXL\ZTC\TCXLZTx.LIB
  612.  
  613.   The 'x' above represents one of the letters s, m, c or l.
  614.  
  615.  
  616. STEP 3.......COMPILE/LINK DEMO
  617.  
  618. At the  completion of  START.BAT, you  will be  given a pair of environment
  619. variables to  create:   TCXL_A and  TCXL_C.  Follow the directions, and add
  620. these two variables using the DOS SET command.
  621.  
  622. Next, change  to the  \TCXL55\DEMO directory.   Depending  on the source of
  623. your copy  of TCXL,  a compiled  demonstration program  may or  may not  be
  624. provided.   To create  a demo program, execute the MAKEDEMO.BAT file.  This
  625. will compile/link the TCXL Demonstration Program using the default options.
  626.  
  627.  
  628.  
  629.  
  630.  
  631.                      Converting Your Code From CXL 5.x
  632.  
  633. To convert  your existing  CXL projects  to use  TCXL 5.5, we have provided
  634. RP.EXE and CONVERT.BAT (see descriptions below).
  635.  
  636. Simply copy  CONVERT.BAT to  your project directory, edit the batch file to
  637. show the  appropriate paths,  and run  the batch  file.   This will convert
  638. between 90  and 95  percent of  your code .... your compiler will catch the
  639. rest of the changes.
  640.  
  641.  
  642.  
  643.  
  644.  
  645. TesSeRact CXL V5.5 User's Guide                                      Page 7
  646.                               The TCXL Tools
  647.  
  648. Every good  programmer has a set of tools -- so we thought we'd share a few
  649. with you.      We use these tools internally during testing, as well as for
  650. completing the libraries themselves.  Please note that these tools are only
  651. provided by  IDC with  the registered user package.  The individual authors
  652. of the  utilities may  choose to release them directly; however, that is up
  653. to the  individual author,  and IDC  will neither  encourage nor discourage
  654. them in this process.
  655.  
  656. ---------------------------------------------------------------------------
  657.  
  658. NAME.........MakHlp
  659.   Copyright (c) 1987-1990, Innovative Data Concepts. All Rights Reserved
  660.  
  661. DESCRIPTION
  662.      This program compiles and indexes a TCXL help file.
  663.  
  664. SYNTAX.......MakHlp [-tn] <ifil> <ofil>
  665.   Where : -t      Optional tab-width [2..32]. Default is 8
  666.           <ifil>  input ASCII TCXL help-file
  667.           <ofil>  output compiled TCXL help-file
  668.  
  669. USAGE
  670.      See the discussion on the TCXL Help System for more details.
  671.  
  672. ---------------------------------------------------------------------------
  673.  
  674. NAME.........MakRsp
  675.   Copyright (c) 1987-1990, Innovative Data Concepts. All Rights Reserved
  676.  
  677. DESCRIPTION
  678.      Create response file for TLIB/LIB/ZORLIB.
  679.  
  680. SYNTAX.......MakRsp <M|T|Z> <S|M|C|L> <A|C>
  681.   Where : <M|T|Z>    <M>icrosoft, <T>urbo, or <Z>ortech.
  682.           <S|M|C|L>  Memory Model
  683.           <A|C>      Source Code is Assembler or C
  684.  
  685. USAGE
  686.      Used by the TCXL batch files.
  687.  
  688. ---------------------------------------------------------------------------
  689.  
  690.  
  691.  
  692.  
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704. Page 8                                      TesSeRact CXL V5.5 User's Guide
  705. NAME.........DifCmp
  706.   Copyright (c) 1985-1990, Princeton-Galax Systems, All Rights Reserved
  707.  
  708. DESCRIPTION
  709.      FAST, Line-oriented,  text-file comparator  to generate checksummed
  710.      delta-scripts for the PGS DifEdt stream editor.
  711.  
  712. SYNTAX.......DifCmp <dfil> <pfil> <cfil>
  713. .............DifCmp @<rfil>
  714.   Where : <dfil> = Generated delta-script file for PGS DifEdt to edit
  715.                    <pfil> into <cfil>.
  716.           <pfil> = Previous version of text-file.
  717.           <cfil> = Current version of text-file.
  718.           <rfil> = Response file of multiple "<dfil> <pfil> <cfil>"
  719.                    command lines with optional '#'-prefixed comment
  720.                    lines and/or trailing comments.
  721.  
  722. USAGE
  723.   For more details, see the DifCmp.D file in your BIN directory.
  724.  
  725. ---------------------------------------------------------------------------
  726.  
  727. NAME.........DifEdt
  728.   Copyright (c) 1985-1990, Princeton-Galax Systems, All Rights Reserved
  729.  
  730. DESCRIPTION
  731.      FAST, Line-oriented,  text-file stream  editor to apply checksummed
  732.      delta-scripts generated by the PGS DifCmp Delta file comparator.
  733.  
  734. SYNTAX.......DifEdt [-n] [-z] <dfs> <pfs>
  735. .............DifEdt [-n] [-z] @<rfs>
  736.   Where : -n    = Ensure output file has a trailing NewLine.
  737.           -z    = Ensure output file has a CP/M-style ^Z EOF for
  738.                   certain MS-DOS compilers, etc., that require it.
  739.           <dfs> = Filespec of delta script generated by PGS DifCmp for
  740.                   <pfs>.
  741.           <pfs> = Filespec of previous version of text-file. Output
  742.                   consists of <pfs> edited IN PLACE by the commands in
  743.                   <dfs>.
  744.           <rfs> = Filespec of response file consisting of one or more
  745.                   "<dfs> <pfs>" command lines with optional '#'-prefixed
  746.                   comment lines and trailing comments.
  747.  
  748. USAGE
  749.   For more details, see the DifCmp.D file in your BIN directory.
  750.  
  751. ---------------------------------------------------------------------------
  752.  
  753.  
  754.  
  755.  
  756.  
  757.  
  758.  
  759.  
  760.  
  761.  
  762.  
  763. TesSeRact CXL V5.5 User's Guide                                      Page 9
  764. NAME.........RPL
  765.   RPL Version 2.10  (c) Copyright Doug MacLean 89
  766.  
  767. DESCRIPTION
  768.      Unix-Style Replace From Script.
  769.  
  770. SYNTAX.......RPL [options] "search exp" "replacement exp" [files]
  771.   Where :
  772.      -c      Print a count of replacements to stderr when done.
  773.      -d      Delete the entire line (don't give a replacement expression
  774.              argument).
  775.      -e      Take next 2 arguments as search expr and replacement expr.
  776.      -f      (Filter) read input from stdin, ouput to stdout.
  777.      -h      Help with regular expression syntax.
  778.      -p      Print matching expressions at stdout (or stderr if `-f'
  779.              option).
  780.      -s file Take next argument as filename of change script file.
  781.      -u      Ignore case.
  782.      -v      (Verify) preview and confirm each replacement with options:
  783.            All:        Replace all the remaining matches in this file.
  784.            Continue:   Replace this one and keep going.
  785.            Once:       Replace this one and no others in this file.
  786.            Skip:       Don't replace this one, keep going.
  787.            Quit:       Don't replace any more in this file.
  788.            Exit:       Abort and exit with input file unchanged.
  789.  
  790. USAGE
  791.   Used to  convert source  files from CXL 5.2 to TCXL 5.5 (See CONVERT.*
  792.        descriptions)
  793.  
  794. ---------------------------------------------------------------------------
  795.  
  796. NAME.........SWAPNG
  797.   Copyright 1989-90, Innovative Data Concepts, All Rights Reserved
  798.  
  799. DESCRIPTION
  800.      SWAP Utility for The Norton Guides.  Shareware Version.
  801.  
  802. USAGE
  803.   For all details, see the SWAP.DOC file in your BIN directory.
  804.  
  805. ---------------------------------------------------------------------------
  806.  
  807. NAME.........CONVERT.001 though CONVERT.008
  808.  
  809. DESCRIPTION
  810.      Conversion scripts to convert from CXL 5.x to TCXL 5.5
  811.  
  812. SYNTAX.......RPL -p -s CONVERT.00x filename.c >>convert.log
  813.   Where :
  814.       'x' is the numbers 1 through 8
  815.       filename.c is the file to convert
  816.       convert.log is a log file that captures RPL output
  817.  
  818. USAGE
  819.   Use these  scripts, in  conjunction with RPL, to convert approximately
  820.        90 percent of your existing CXL 5.x code to TCXL 5.5.
  821.  
  822. Page 10                                     TesSeRact CXL V5.5 User's Guide
  823. ---------------------------------------------------------------------------
  824.  
  825. NAME.........TCXL.NG
  826.  
  827. DESCRIPTION
  828.      Norton Guides Help File for TCXL 5.5
  829.  
  830. USAGE
  831.   Copy the  TCXL.NG file  to the directory where you store your other NG
  832.        databases, and  select "TCXL  Help" from the (O)ptions/(D)atabase
  833.        Menu. (Don't you wish they had used TCXL??)
  834.  
  835. ---------------------------------------------------------------------------
  836.  
  837. NAME.........TCXL.HLP
  838.  
  839. DESCRIPTION
  840.      Microsoft Quick  Help hypertext online database for TCXL 5.5.  This
  841.      facility of the newer Microsoft language products provides complete
  842.      access  to   all  TCXL   functions  and   tables  from  within  the
  843.      Programmer's WorkBench, CodeView, and QuickHelp.
  844.  
  845. USAGE
  846.   Place TCXL.HLP in the directory with the other help files.  To look up
  847.        a function such as MnuBeg(), type:
  848.  
  849.             QH MnuBeg
  850.  
  851.   From the  command-line, or  place the cursor over the desired function
  852.        name from  the workbench,  and right  clock your  mouse (or press
  853.        F1).
  854.   In Quick  Help, there  is a  menu selection  at the  top of the screen
  855.        called "References."   This  feature will permit you to call up a
  856.        complete listing  of all  TCXL functions,  and any  table you may
  857.        wish to see.
  858.  
  859. ---------------------------------------------------------------------------
  860.  
  861.  
  862. Using Library Functions
  863.  
  864. Every function  in the TCXL library has a corresponding prototype in one of
  865. the distributed  header files.   In  the function reference portion of this
  866. document, each  routine is  marked with  the appropriate  header file.  The
  867. exception is  TCXLDEF.H, which  is automatically  included when you include
  868. any other TCXL header file.
  869.  
  870. The header  files are  system header  files, rather than local files; i.e.,
  871. they should be placed in the same directory as your standard include files,
  872. and are  referenced using  angle-brackets (<  >) instead  of quotes,  as in
  873. previous versions.  For example:
  874.  
  875.   #include      <dos.h>
  876.   #include      <stdio.h>
  877.   #include      <TCXLwin.h>
  878.   #include      <TCXLvid.h>
  879.  
  880.  
  881. TesSeRact CXL V5.5 User's Guide                                     Page 11
  882.                            Compiling and Linking
  883.  
  884. The  basic  command  line  compiler/linker  commands  to  build  your  file
  885. containing TCXL  functions are  as follows  (this does  assume that the LIB
  886. directories and paths have been set up appropriately for your compiler):
  887.  
  888.      Microsoft C:
  889.  
  890.      cl myfile.c tcxlmss.lib
  891.  
  892.      Quick C:
  893.  
  894.      qcl myfile.c tcxlmss.lib
  895.  
  896.      Turbo C/C++:
  897.  
  898.      tcc myfile.c tcxltcs.lib
  899.  
  900.      Zortech C/C++:
  901.  
  902.      ztc myfile tcxlzts.lib
  903.  
  904. To use  TCXL from  the Turbo C integrated environment (TC.EXE), you need to
  905. create a  project file  containing the  name of the TCXL library.   You can
  906. call it MYFILE.PRJ and it can consist of just one line:
  907.  
  908.      myfile.c tcxltcs.lib
  909.  
  910. Then when you run TC.EXE, set the project file name to MYFILE.PRJ and press
  911. the Make key.
  912.  
  913. Please note  that if  you use  the Microsoft Linker, and you use any of the
  914. large code  models (medium  or large),  you will need to use /SE:768 on the
  915. link command-line, to tell the linker you've got a lot of segments.
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.  
  931.  
  932.  
  933.  
  934.  
  935.  
  936.  
  937.  
  938.  
  939.  
  940. Page 12                                     TesSeRact CXL V5.5 User's Guide
  941.                            Library Organization
  942.  
  943. The TCXL library is organized into various systems and subsystems.  A quick
  944. look at the library structure can be of assistance:
  945.  
  946.      User Level:         Menu System
  947.                          Entry System
  948.                          Help System
  949.                          Selection System
  950.  
  951.      Middle Level:       Window System
  952.                          Display System
  953.                          Input System
  954.                          Strings System
  955.  
  956.      Hardware Level:     Information Subsystem
  957.                          Memory Subsystem
  958.                          Printer Subsystem
  959.                          OpSys Subsystem
  960.  
  961.      Bottom Level:       Video Access Subsystem
  962.                          Keyboard Access Subsystem
  963.                          Mouse Access Subsystem
  964.  
  965.      Internal Level:     Conversion Subsystem
  966.                          Format Control Subystem
  967.                          Near/Far Subsystem
  968.  
  969.  
  970. In our  descriptions of  the various  functions, we  will be  keeping  this
  971. structure in  mind.   The User  Level of  TCXL is  all you normally need to
  972. write fully-featured  applications.   If your  application also needs text-
  973. based windows, input from the user that is not part of a form, or access to
  974. video parameters,  then you'll  also write  code that  accesses the  Middle
  975. Level of TCXL.
  976.  
  977. The Hardware Level is next, and is composed of ALL the machine-specific and
  978. operating-system dependent  code.   It is separate from the other levels of
  979. TCXL simply  because not  all the  features at this level will be available
  980. when TCXL  is ported  to other platforms.  Additionally, none of the higher
  981. levels are dependent on these routines for their functionality.
  982.  
  983. The Bottom  Level of TCXL is the direct access to the hardware that is used
  984. by the  upper-level systems.   A user interface has input and output.  TCXL
  985. supports input  through both  the mouse  and the  keyboard, and  has output
  986. though both BIOS routines and direct access to the video hardware.
  987.  
  988. At the  Internal Level  are all the internal routines that TCXL needs to do
  989. its work.
  990.  
  991. This structure  has been  designed for a specific purpose:  To move TCXL to
  992. another hardware  or software  platform, we  need only  replace the "Bottom
  993. Level" of  the library  for  routines  specific  to  the  environment,  and
  994. recompile with  an ANSI-compatible compiler!  This might give you a hint of
  995. some future plans for IDC ....
  996.  
  997.  
  998.  
  999. TesSeRact CXL V5.5 User's Guide                                     Page 13
  1000.                               Future Planning
  1001.  
  1002. TCXL 5.5  is Innovative  Data Concept's  initial version  of this  product.
  1003. Needless to say, we have lots more planned.  TCXL 6.0 is due to be released
  1004. in the  1st Qtr  1990, and  will include  things like  a full  event-driven
  1005. interface,  a   configurable  printer   system,  an  interface  to  graphic
  1006. interfaces, and more.
  1007.  
  1008. IDC is  also planning  on porting  CXL to  different hardware platforms, as
  1009. well as  to different  PC operating  environments.  We are actively seeking
  1010. development and  marketing partners in this venture.  Call us to talk about
  1011. it.
  1012.  
  1013.  
  1014.                           Using the TCXL Systems
  1015.  
  1016.  
  1017.                                  OverView
  1018.  
  1019.  
  1020. In order to initialize the TCXL low-level routines, and correctly determine
  1021. the configuration  of the  machine  the  program  will  run  on,  you  MUST
  1022. initially  make   a  call  to  the  function  TcxlInit().    This  function
  1023. initializes the  Bottom-Level Subsystems (Video Access, Keyboard Access and
  1024. Mouse Access),  as well  as fills  in the  configuration information in the
  1025. _TcxlCtl structure.
  1026.  
  1027. The Video  Access Subsystem  is initialized to use the current screen mode,
  1028. and the  current screen  dimensions.   If Ultravision is in the system, the
  1029. appropriate bytes in _TcxlCtl are set for the current configuration.
  1030.  
  1031. The Keyboard  Access  Subsystem  is  initialized  to  use  the  "old-style"
  1032. keyboard BIOS routines (Int 16h, Fn 00h and 001h).  If an enhanced keyboard
  1033. BIOS is  detected (TcxlKey  macro), then  it is possible to ask TCXL to use
  1034. the extended  keyboard BIOS  calls (Int 16h, Fn 10h and 11h) instead.  Call
  1035. _KextOn() to enable the extended BIOS calls.
  1036.  
  1037. The Mouse  Access Subsystem  auto-detects whether  a mouse  is installed in
  1038. your computer.   If  a mouse  exists, it  is initialized,  and the mouse is
  1039. turned off.   When  you call  MnuShow(), EntShow(), or any of the Selection
  1040. System functions,  the mouse  is automatically turned on with full support,
  1041. including a software cursor.  You may change this support during processing
  1042. of your  own routines,  but during  menus, entry  forms and selections, the
  1043. mouse is  automatically active.   The  mouse  buttons  also  correspond  to
  1044. keystrokes:   Left=[Enter], Right=[Esc], Middle=[F1].  You may change these
  1045. keys using the Mskeys() function.
  1046.  
  1047. Because TcxlInit()  initializes the low-level routines, it is not necessary
  1048. for a  user program to call VidInit(), MSinit() or KeyInit().  In addition,
  1049. the TcxlTerm()  function is automatically installed as an "atexit" routine,
  1050. and is  called when  your  program  terminates  --  therefore,  it  is  not
  1051. necessary to de-install any of these systems.
  1052.  
  1053. TcxlInit() will  also call  MemInit(), to determine the types of additional
  1054. memory that  is installed  in the  system, and to determine which standards
  1055. set is in use (DPMI, VCPI, etc).
  1056.  
  1057.  
  1058. Page 14                                     TesSeRact CXL V5.5 User's Guide
  1059.  
  1060.                                 Menu System
  1061.  
  1062.  
  1063. The TCXL  Menu System  can be as simple as a single-level popup menu, or as
  1064. complex as  a multi-level pull-down bar menu system.  No matter how complex
  1065. your menus are, with TCXL you use the same basic calling sequence to define
  1066. them.  The basic format (optional calls are in  brackets []) is:
  1067.  
  1068.  
  1069.  
  1070. <MnuBeg|MnuAct>
  1071.  
  1072. MnuItm
  1073.  
  1074. [ItmTxt]
  1075.  
  1076. [ItmFun]
  1077.  
  1078.      [<MnuBeg|MnuAct>]
  1079.  
  1080.      [MnuItm]
  1081.  
  1082.      [...]
  1083.  
  1084.      [MnuEnd]
  1085.  
  1086. MnuEnd
  1087.  
  1088. MnuShow
  1089.  
  1090.  
  1091.  
  1092. Either MnuBeg()  or MnuAct()  is required  to mark  the start  of  a  menu;
  1093. MnuItm() is  required to  define menu  items; MnuEnd()  marks the  end of a
  1094. menu; and MnuShow() initiates user processing of the entire menu structure.
  1095.  
  1096. Notice that you can also define entire menus underneath any individual menu
  1097. item.   This allows  you to  easily create  nested menus to aid in building
  1098. complex pull-down  and multi-layered  menuing systems. There is no limit to
  1099. how deep you can nest sub-menus, with the exception of available memory.
  1100.  
  1101. When coding multi-level menu systems, it is a good idea to use indenting as
  1102. shown above  to help you distinguish which menu items and menu-ends go with
  1103. which menu-begins.
  1104.  
  1105. ItmTxt() and  ItmFun() are  optional functions.   They  allow you to attach
  1106. specific features  to a  particular menu  item.  If you use either of these
  1107. two functions,  they must  immediately follow the call to MnuItm() to which
  1108. they pertain.
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117. TesSeRact CXL V5.5 User's Guide                                     Page 15
  1118. After you define the menu structure and call MnuShow(), the user is allowed
  1119. to make  a selection.   The  following editing  keys (editing keys are also
  1120. listed in Appendix F) may be used by the user when processing the menu:
  1121.  
  1122.  
  1123.   Menu Movement Key  Action
  1124.   -----------------  ------
  1125.   LeftArrow..........moves selection bar to item left.
  1126.   RightArrow.........moves selection bar to item right.
  1127.   UpArrow............moves selection bar to item upwards.
  1128.   DownArrow..........moves selection bar to item downwards.  If the
  1129.              current menu item has a pull-down menu attached, then it
  1130.              will be opened for processing.
  1131.   Enter..............selects the item that the selection bar is on.  If
  1132.              selected item has a sub-menu attached, then processing of
  1133.              that menu will begin.
  1134.   Home...............moves selection bar to upper-leftmost item.
  1135.   End................moves selection bar to lower-rightmost item.
  1136.   Esc................if Escape checking is on, and you are in the root
  1137.              menu, pressing this cancels input and returns a -1. If
  1138.              inside a sub-menu, then you will just back up to the
  1139.              previous menu.
  1140.  
  1141. You can also quick-select a menu item by pressing its highlighted selection
  1142. character, unless this feature is disabled.
  1143.  
  1144. Each menu  item can  have a  function and/or sub-menu attached to it.  When
  1145. the user  selects the menu item, MnuShow() will first check for an attached
  1146. sub-menu.   If one exists, it will be processed.  Then MnuShow() will check
  1147. for a defined select function.  If one exists, then MnuShow() will call it.
  1148.  
  1149. This gives  you two ways to handle a user selection.   The first, as you've
  1150. seen, is to have a function attached to the menu item.  For example, if the
  1151. menu  item   is  "(A)dd  Record"  and  it  has  a  select  function  called
  1152. add_record(), then  it will  be called  upon selecting that menu item.  The
  1153. other way  to handle a user selection is by using a switch/case to test the
  1154. return value  from MnuShow().   This  will work best on single-level menus,
  1155. since MnuShow()  only returns  the tag ID of the root menu's selection, but
  1156. sometimes gives you more flexibility.
  1157.  
  1158. Please note  that mouse  support is  automatically  activated  during  menu
  1159. processing, if  a mouse  has been detected during initialization.  Also, be
  1160. aware that  the mouse  is de-activated  during before/after  procedures, as
  1161. well as  when processing the menu's select functions.  Programmers who wish
  1162. to take  advantage of  the mouse  in their  own windows  (not in one of the
  1163. automatic systems  of TCXL)  will need  to specifically  enable the type of
  1164. mouse support they want.
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176. Page 16                                     TesSeRact CXL V5.5 User's Guide
  1177.                                Entry System
  1178.  
  1179.  
  1180. Initializing TCXL's  multi-field Entry  System is very similar to designing
  1181. menus.  There are certain functions associated with building an entry form,
  1182. and they  must be  called in  a particular  order.   The basic  format (and
  1183. again, all optional calls are in brackets) of all form structures is:
  1184.  
  1185.   EntDef
  1186.   FldDef
  1187.   [FldKey]
  1188.   [FldFun]
  1189.   EntShow
  1190.  
  1191.  
  1192. Just three functions are needed to process multi-field formatted input from
  1193. windows.   EntDef() is  used to mark the beginning of the form; FldDef() is
  1194. used to  define the  individual data  entry fields, and EntShow() marks the
  1195. end of the form and initiates user processing of the form.
  1196.  
  1197. FldKey() and  FldFun() are  optional functions.   They  allow  you  to  add
  1198. specific procedures  to be  called before  and/or after  processing of  the
  1199. field. If  you use  either of  these two  functions, they  must immediately
  1200. follow the call to FldDef() to which they pertain.
  1201.  
  1202. The formatted input capabilities of the Entry System are much like those of
  1203. the KvGetFmt()  and KwGetFmt()  functions in  the Input  System.  The major
  1204. difference is  that with  the Entry  System, you  can edit  back and  forth
  1205. between fields  before finally  accepting the  entry form.   Note  that the
  1206. Format Control Codes in Appendix E are valid (except where noted) with both
  1207. the Input System and the Entry System.
  1208.  
  1209.  
  1210.  
  1211.  
  1212.  
  1213.  
  1214.  
  1215.  
  1216.  
  1217.  
  1218.  
  1219.  
  1220.  
  1221.  
  1222.  
  1223.  
  1224.  
  1225.  
  1226.  
  1227.  
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234.  
  1235. TesSeRact CXL V5.5 User's Guide                                     Page 17
  1236. In the  Entry System,  you may  set a validation function for each field on
  1237. the form.   During  processing, EntShow() will call this function after you
  1238. leave the  field to  validate the  information input..  You  can  use  this
  1239. function for  validating, modifying,  displaying error  messages,  or  just
  1240. about anything.   This function must accept a pointer to char for input and
  1241. return either  0 for no error, or the position in the field where the error
  1242. occurred (starting  with 1).   If the validation function returns non-zero,
  1243. EntShow() forces the user to remain within the field and edit the incorrect
  1244. information.   Here's an  example field validation function that checks for
  1245. embedded spaces:
  1246.  
  1247.   IntT check_field_for_embedded_spaces(ChrP input_field)
  1248.   {
  1249.   IntT current_position = 1,
  1250.        error_position = 0;
  1251.  
  1252.   while(*input_field++ != ' ')     /* search for end of text    */
  1253.       current_position++;
  1254.   while(*input_field == ' ')       /* search to end of field for*/
  1255.  
  1256.   {                                /*     non-space characters  */
  1257.       current_position++;
  1258.       input_field++;
  1259.   }
  1260.   if(*input_field!='\0')            /* if at end of field, then */
  1261.       error_position = current_position;    /* field is invalid */
  1262.  
  1263.   return(error_position);
  1264.   }
  1265.  
  1266.  
  1267. Once you have defined all input fields with EntDef(), you call EntShow() to
  1268. process them.   The  user is  allowed to  move around  and edit  all of the
  1269. fields.   The input  fields are validated on the fly and after entering the
  1270. last field.  Valid editing keys are listed in Appendix F.
  1271.  
  1272. In addition,  if you  specify a  "hotkey" to an Entry Field using FldKey(),
  1273. you may  also move  directly to  a particular field whenever that hotkey is
  1274. pressed.
  1275.  
  1276. Please note that mouse support is automatically activated during entry form
  1277. processing, if  a mouse  has been  detected during  initialization.   If  a
  1278. hotkey has  been set  for a  particular field,  clicking the  mouse on that
  1279. field will automatically move the cursor to that field for input.
  1280.  
  1281. After the EntShow() function returns, all fields defined with EntDef() will
  1282. be cleared.   The  receiving strings of all defined fields will now contain
  1283. the data  entered.   If Escape  checking was on and [Esc] was pressed, then
  1284. all receiving  strings will  contain the  values they held before EntShow()
  1285. was called and TcxlErr() will return W_ESCPRESS.
  1286.  
  1287.  
  1288.  
  1289.  
  1290.  
  1291.  
  1292.  
  1293.  
  1294. Page 18                                     TesSeRact CXL V5.5 User's Guide
  1295. Sometimes, you may have a need to extend or modify the data entry keys used
  1296. by EntShow()  during processing  of the  fields.    There  is  a  function,
  1297. EntKey(), that  enables this.   What EntKey() does is defines a function to
  1298. be used  as  the  alternate  get-key  function  so  that  during  EntShow()
  1299. processing you  can get  a key, test it, change it, or do whatever else you
  1300. like with  it before  you return  it to  EntShow().   It also  lets you  to
  1301. specify a  variable to receive the key that caused termination of the form.
  1302. The call  to EntKey()  can  be  contained  anywhere  between  EntDef()  and
  1303. EntShow().
  1304.  
  1305. Often, when  dealing with database records, users would like to have [PgUp]
  1306. mean previous  record and  [PgDn] mean next record.  Let's also say that we
  1307. want to  use [F10]  as the normal exit key instead of the currently defined
  1308. [Ctrl-Enter].   Here is  an example  of an alternate get-key function would
  1309. handle this:
  1310.  
  1311.   WrdT get_key(IntP done)
  1312.   {
  1313.   WrdT key;
  1314.  
  1315.   key=KeyGetc();
  1316.                     /* if key was [F10], change it to [Ctrl-Enter] */
  1317.   if(key=0x4400)
  1318.       key=0x1c0a;
  1319.                     /* if key was [PgUp] or [PgDn], set done flag on */
  1320.   if(key==0x4900 || key==0x5100)
  1321.       *done=TRUE;
  1322.  
  1323.   return(key);
  1324.   }
  1325.  
  1326.  
  1327.  
  1328.  
  1329.  
  1330.  
  1331.  
  1332.  
  1333.  
  1334.  
  1335.  
  1336.  
  1337.  
  1338.  
  1339.  
  1340.  
  1341.  
  1342.  
  1343.  
  1344.  
  1345.  
  1346.  
  1347.  
  1348.  
  1349.  
  1350.  
  1351.  
  1352.  
  1353. TesSeRact CXL V5.5 User's Guide                                     Page 19
  1354.  
  1355.                       Using Format Control Characters
  1356.  
  1357.  
  1358. The format control characters used by the Entry System and the Input System
  1359. controls how each character is input and how large the input field will be.
  1360. It consists  of 1  or more  format  characters,  and  may  optionally  have
  1361. displayed text  in between  any of  the format control characters.  You may
  1362. use spaces in between the format control characters for readability of your
  1363. code; however, these spaces will NOT be used for input.  A complete list of
  1364. valid  format  control  characters  are  listed  in  Appendix  E  (case  IS
  1365. significant).   All Format  Control Characters  are valid in both the Entry
  1366. System and the Input System, except for command toggles.
  1367.  
  1368. In a  change from  previous versions  of this  product, decimal  points are
  1369. returned as  part of  the TCXL  field string,  when using  the '9'  or  '$'
  1370. control codes.   Therefore,  the numeric  conversion routines cvt..(), have
  1371. been changed  to account  for this.   There  are 4  conversion functions to
  1372. convert numbers to/from TCXL fields:
  1373.  
  1374.   cvtic()............convert integer to TCXL field string
  1375.   cvtci()............convert TCXL field string to integer
  1376.   cvtfc()............convert floating point to TCXL field string
  1377.   cvtcf()............convert TCXL field string to floating point
  1378.  
  1379.  
  1380. To correctly  use numeric  fields, you  must first convert your number to a
  1381. TCXL field  string with  cvtic() or  cvtfc(), and  on return from the entry
  1382. form, you should convert the result back to the correct type of number.
  1383.  
  1384.                                 Help System
  1385.  
  1386.  
  1387. TCXL's context-sensitive help system operates on the principle of a current
  1388. help category  and a  help category  stack.   Both require  some explaining
  1389. before you begin to use them.
  1390.  
  1391. The current  help category  is the  one that  will be  used when  the  user
  1392. presses the  help key.   It  can be set by one of several ways.  The direct
  1393. way is  for you  to explicitly  set it by calling HlpSet().  There are also
  1394. indirect ways  that the  current help  category can be set.  Windows, input
  1395. fields, and  menu items  each have  individual help  categories as  part of
  1396. their record.   If  you were  to activate  a window  which has its own help
  1397. category, then  that would  become the  current help  category. During  the
  1398. processing of  input fields and menus, each time you move to a new field or
  1399. menu item  item, the  current help  category is  set to  the  whatever  the
  1400. field/item's help  category is, even if that category is zero (empty). This
  1401. means that  input forms  and menus  overwrite what  was in the current help
  1402. category before the form/menu began processing.
  1403.  
  1404.  
  1405.  
  1406.  
  1407.  
  1408.  
  1409.  
  1410.  
  1411.  
  1412. Page 20                                     TesSeRact CXL V5.5 User's Guide
  1413. To keep  from losing  the current  help category  during the  processing of
  1414. forms and  menus, you  need to  be able  to save  the current help category
  1415. during that  period.   This is where the help stack comes into the picture.
  1416. To save  the current  help category,  you  push  it  onto  the  stack  with
  1417. HlpCur().   When you  need to retrieve it, you pop it back off of the stack
  1418. using HlpPop().   The  category popped  off of  the stack  then becomes the
  1419. current help category.  This help stack is a LIFO (Last In First Out) stack
  1420. and holds up to 20 help categories.
  1421.  
  1422. When the  help key is pressed (or when the HlpShow() function is called) by
  1423. the user,  TCXL's help  processor will search the help file for the current
  1424. help category.  If the current help category is zero (empty), then the help
  1425. category off  top of  the stack will be used.  This is where the help stack
  1426. comes in  handy.   It allows  you to  have a "background" help category for
  1427. menu items and fields that don't have help categories of their own.  Before
  1428. processing of  the form  or menu,  you  simply  push  the  background  help
  1429. category onto the stack.
  1430.  
  1431. When the  help category  is found  in the help file, the corresponding help
  1432. text will  be displayed on the screen in the help window.  If there is more
  1433. than  1   page  of  text,  the  user  can  change  between  pages  via  the
  1434. [PgUp]/[PgDn] keys.   If  there are cross-reference items, the user can use
  1435. the arrow  keys to  move between  them, and use [Enter] to select. Pressing
  1436. [Esc] will exit the help window.
  1437.  
  1438. During help  processing, all  keys attached to functions via KbndSet() will
  1439. be disabled  to avoid  conflict with  the help system.  If you wish to have
  1440. defined keys  available during  help processing,  you can  define themusing
  1441. KbndSet() in  the "open"  function specified in the HelpDef() function.  If
  1442. you define  any keys  in the  "open" function,  you will  not need to worry
  1443. about freeing  them as  the help  processor will free any user-defined keys
  1444. before exiting help.
  1445.  
  1446. The size  and placement of the help window are adjustable.  The help window
  1447. size by  default is  19 rows by 64 columns centered on the screen. This can
  1448. be changed  using HlpWind().   The  HelpWind()  function  sets  the  screen
  1449. coordinates to  be used  when opening the help window and can be called any
  1450. time after  HelpDef().  If you ever want to disengage the help system, just
  1451. call HlpOff().
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458.  
  1459.  
  1460.  
  1461.  
  1462.  
  1463.  
  1464.  
  1465.  
  1466.  
  1467.  
  1468.  
  1469.  
  1470.  
  1471. TesSeRact CXL V5.5 User's Guide                                     Page 21
  1472.                             Building Help Files
  1473.  
  1474.  
  1475. Creating help  files is  quite easy.   You  need to have an ASCII editor to
  1476. create them with.  You should have your editor set to expand tab characters
  1477. to spaces.   Your help file can contain several help categories. Here is an
  1478. example of a couple of defined help categories:
  1479.  
  1480.   *B 1,Help Category 1
  1481.   help text help text help text
  1482.   help text help text help text
  1483.   help text help text help text
  1484.   *P
  1485.   help text help text help text
  1486.   help text help text help text
  1487.   help text help text help text
  1488.   *E
  1489.  
  1490.   *B 2,Help Category 2
  1491.   help text help text help text
  1492.   help text help text help text
  1493.   help text help text help text
  1494.   *P
  1495.   help text help text help text
  1496.   help text help text help text
  1497.   help text help text help text
  1498.   Also see:    ^Help Category 1^
  1499.   *E
  1500.  
  1501.  
  1502. The "*B"  indicator specifies the beginning of a help category.  The format
  1503. is "*B  helpcatnumber[,helpcatname]".   The help  category  number  is  the
  1504. number of  the help category that you set using HlpSet().   There should be
  1505. only one  space between  the "*B"  and the  help category  number. The help
  1506. category name  is only  required for  cross-references.   If there  are  no
  1507. cross-references to  that help category, then you can leave the helpcatname
  1508. parameter out.
  1509.  
  1510. The "*P" indicator specifies a page break and is optional.  You may have as
  1511. many page breaks as you'd like. The "*E" indicator specifies the end of the
  1512. help category.   The  "*B", "*P", and "*E" indicators must all begin in the
  1513. first column.   These  indicators and  the  help  category  name  are  case
  1514. insensitive (can be in lowercase, uppercase, or mixed).
  1515.  
  1516. TCXL represents  help categories as integers.  When assigning help category
  1517. numbers in the help file, you should start at 1 and go up from there.  Help
  1518. category 0 is reserved to represent an empty help category.
  1519.  
  1520. In the  definition of  Help Category 2, you will notice the cross-reference
  1521. to Help  Category 1.  All cross-referencing is done by embedding the cross-
  1522. reference category  name (not  number) inside  carats (^).   If you need to
  1523. display a carat inside the help file, use a double carat (^^).
  1524.  
  1525.  
  1526.  
  1527.  
  1528.  
  1529.  
  1530. Page 22                                     TesSeRact CXL V5.5 User's Guide
  1531. Any text  contained outside  of the  "*B"  and  "*E"  will  be  treated  as
  1532. comments.  If an "*E" is not found, then the end-of-file will be treated as
  1533. an "*E".
  1534.  
  1535. Now, you need to "compile" your ASCII help file into an indexed file. There
  1536. is utility,  MAKHLP.COM, which  takes your  ASCII help  file as  input, and
  1537. outputs an  indexed version  of of  the same  file.   This new  file is the
  1538. actual help  file that  you specify  in the  HelpDef() function.   Keep the
  1539. ASCII help file around so you will be able to make modifications.
  1540.  
  1541.                              Selection System
  1542.  
  1543.  
  1544. TCXL's  Selection   System  is   a  powerful  tool  to  help  users  select
  1545. information.   SelFile(), SelStr()  and SelTxt() all use the same low-level
  1546. input routine,  _Select().   SelAttr() is  provided not only because of its
  1547. obvious usefulness,  but as  an example  of what  can be accomplished using
  1548. TCXL.
  1549.  
  1550. To use the Selection System, you just need to call the appropriate routine.
  1551. To select  a file,  for example, call SelFile(), specifying the size of the
  1552. window to  use, etc.   Upon  return, the  pathname of  the  file  you  were
  1553. attempting to select will be waiting!
  1554.  
  1555. Although the  structures and variables in the Selection System are internal
  1556. only, two  global variables, SelPtr and SelNdx, (See Page (?)) are provided
  1557. to allow  users access  to the  currently-highlighted  item.    This  would
  1558. normally be  used in  a function bound to a special key that needed to know
  1559. what item is currently selected.
  1560.  
  1561. Please note that mouse support is automatically activated during entry form
  1562. processing, if a mouse has been detected during initialization.  This means
  1563. you can  select an item with your mouse, and you can also scroll the window
  1564. using the provided scroll bars.
  1565.  
  1566.                                Window System
  1567.  
  1568.  
  1569. The Window System is the "heart" of the TCXL package.  It is the largest of
  1570. all the  systems, and  also the  most varied.   Functions  are provided for
  1571. window shapes, sizes, locations, appearances, and for text output.
  1572.  
  1573. Using the Window System is simple.  Call Wopen() to open a window.  Use the
  1574. Wput..() and Wprt..() functions for output.  Use the Wset..() functions for
  1575. setting control information.
  1576.  
  1577. Wopen() returns  a Window Handle, which is used by many of the functions in
  1578. TCXL to determine which window to affect.  Most of the output functions are
  1579. designed to write to the active window, which is the window on "top".
  1580.  
  1581. While TCXL provides limited functionality for writing to hidden or inactive
  1582. windows (see  the Wwprints() (function, this is really not in the design of
  1583. this package.  With TCXL 6.0, we will have full virtual windows.
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589. TesSeRact CXL V5.5 User's Guide                                     Page 23
  1590.  
  1591.                               Display System
  1592.  
  1593.  
  1594. The display  system is  designed to be used for output to the video display
  1595. that is  NOT window-oriented.   It  is separated from the physical display,
  1596. and it is also used by the Window System and the User Level systems.
  1597.  
  1598. Your most  common use  of the  Display System will most likely be accessing
  1599. the cursor position, or calling Vsave() and Vrestore().  For most purposes,
  1600. the Window System should be sufficient.
  1601.  
  1602.                                Input System
  1603.  
  1604.  
  1605. The Input  System is designed to provide a consistent interface between the
  1606. keyboard/mouse and  the display/window.   By  calling the functions in this
  1607. section, keys  are correctly translated, echoed to the appropriate location
  1608. on the  window and/or  display, and buffered appropriately.  Using the Line
  1609. Input routines  (KvFmtGet() and  KwFmtGet()) is  similar to using the Entry
  1610. System.   Some additional  Format Control  Characters are  available;   see
  1611. Appendix E for details.
  1612.  
  1613.                               Strings System
  1614.  
  1615.  
  1616. The  Strings   System  supplements   and   augments   the   string-handling
  1617. capabilities of your compiler's run-time library.  Use it in good health.
  1618.  
  1619.                            Information Subsystem
  1620.  
  1621.  
  1622. The Information Subsystem is the low-level "backbone" of the library.  This
  1623. contains the  TcxlInit() and  TcxlTerm() functions,  as well as a series of
  1624. informational routines such as SysTime(), _Delay(), etc.  While most of the
  1625. functions are  for internal  use by the TCXL library itself, you might find
  1626. some of these functions handy for general use.
  1627.  
  1628.                              Memory Subsystem
  1629.  
  1630.  
  1631. The Memory  Subsystem is  implemented to mirror useful functions in the EMS
  1632. (Expanded Memory  Specification) and  XMS (eXtended  Memory  Specification)
  1633. currently in use by thousands of products on the market today.  WARNING!!!!
  1634. Do not  attempt to  use these functions without a good knowledge of the EMS
  1635. and  XMS   specifications.    They  are  very  low-level,  and  could  have
  1636. disasterous effects if you do not correctly use them.
  1637.  
  1638. This system  also implements detection for the Dos Protected Mode Interface
  1639. (DPMI) and  Virtual Control Program Interface (VCPI) specifications, in use
  1640. currently by  386 control programs and multitaskers such as Windows 3.0 and
  1641. DESQView.  While no control functions are currently available to manipulate
  1642. memory using these interfaces, the auto-detection is enabled.
  1643.  
  1644.  
  1645.  
  1646.  
  1647.  
  1648. Page 24                                     TesSeRact CXL V5.5 User's Guide
  1649. While it  is possible  to access VCPI while DPMI and Windows 3.0 is active,
  1650. we have  disabled that auto-check from the MemInit() function.  Windows 3.0
  1651. is shipped  with the  "VCPIWarning" parameter  set to  "TRUE", which  would
  1652. cause a program to crash if started under Windows 3.0.
  1653.  
  1654. While it  is possible  to have  VCPIWarning set to FALSE, and have programs
  1655. access VCPI  under Windows  3.0, we  felt it  unnecessary to  have  that  a
  1656. requirement for TCXL programs at this time.
  1657.  
  1658. To get a copy of the various specification documentation, please contact:
  1659.  
  1660. DPMI Spec....Version 0.9, May 15, 1990
  1661.   Intel Literature JP26, 1-800-548-4725, Part Number 240763-001
  1662.  
  1663. VCPI Spec....Version 1.0, June 12, 1989
  1664.   Phar Lap Software, Inc, 1-617-661-1510
  1665.  
  1666. XMS Spec.....Version 2.0, August 23, 1988
  1667.   Microsoft Customer Service, 1-800-426-9400
  1668.  
  1669. EMS Spec.....Version 4.0, August 1987
  1670.   Intel Literature JP26, 1-800-548-4725, Part Number 300275-004
  1671.  
  1672.                              Printer Subsystem
  1673.  
  1674.  
  1675. The Printer  Subsystem gives  you a  minimum level of support for printers.
  1676. In addition  to providing  equates for  standard  Epson-compatible  printer
  1677. codes, these  functions also provide string output routines to the "StdPrn"
  1678. device.
  1679.  
  1680.                               OpSys Subsystem
  1681.  
  1682.  
  1683. This is  a "catch-all"  subsystem, with operating-system specific routines,
  1684. as well  as hardware-level  routines.    Most  compiler's  provide  similar
  1685. functionality for  these routines,  but for portability, we added them here
  1686. in a standard format.  Feel free to use them as needed.
  1687.  
  1688.                           Video Access Subsystem
  1689.  
  1690.  
  1691. This is  the "guts"  of the  TCXL Display  System.  These routines directly
  1692. display characters  and attributes  on the  video display.    Each  routine
  1693. determines whether  BIOS writes have been enabled, snow checking is on, and
  1694. whether shadow-buffer updates are necessary.
  1695.  
  1696. Because these  are the  ONLY routines  necessary for  displaying output,  a
  1697. simple modification  of these  routines is all that is necessary to support
  1698. an alternate video system.
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707. TesSeRact CXL V5.5 User's Guide                                     Page 25
  1708. The Video  Access System  also contains  the necessary functions to support
  1709. UltraVision.   Ultravision is  a software  product that lets you unlock the
  1710. hidden capabilities  in your  EGA or  VGA card.  UV gives you a set of more
  1711. than 20  different fonts  to use,  in higher  resolutions,  and  with  more
  1712. control over  screen sizes.   With  UV in your system and a multi-frequency
  1713. monitor, you  can choose  screen sizes  such as  80x60, 108x34,  or 132x50!
  1714. Ultravision also  has a built-in screen accelerator, color palette locking,
  1715. and a lot more features.  Contact Personics at 1-800-445-3311 or 1-508-897-
  1716. 1575 for more details.
  1717.  
  1718.                          Keyboard Access Subsystem
  1719.                           Mouse Access Subsystem
  1720.  
  1721.  
  1722. The Keyboard  Access Subsystem,  together with  the Mouse Access Subsystem,
  1723. make up the low-level code for input from the keyboard and mouse.  Like the
  1724. Video Access  Subsystem, these  routines make  up all  the  low-level  code
  1725. necessary for  accessing these  devices.    Extending  or  replacing  these
  1726. systems are  all that  is necessary  to support  additional or  alternative
  1727. input devices.   If  you are unfamiliary with how to use the provided mouse
  1728. functions,  we   recommend  you   call  Microsoft  and  order  their  Mouse
  1729. Programmer's Reference  Guide (or  see if your local bookstore carries it).
  1730. This is  the definitive answer to how to use the mouse correctly.  We could
  1731. not even  begin to describe the features and caveats of the Microsoft Mouse
  1732. interface in these documents.
  1733.  
  1734.                            Conversion Subsystem
  1735.                          Format Control Subsystem
  1736.                             Near/Far Subsystem
  1737.  
  1738.  
  1739. These three  subsystems are  used internally  by TCXL, and are not designed
  1740. for use access, with the main exception of the cvt..() functions, which are
  1741. described in a previous section.
  1742.  
  1743.  
  1744.  
  1745.  
  1746.  
  1747.  
  1748.  
  1749.  
  1750.  
  1751.  
  1752.  
  1753.  
  1754.  
  1755.  
  1756.  
  1757.  
  1758.  
  1759.  
  1760.  
  1761.  
  1762.  
  1763.  
  1764.  
  1765.  
  1766. Page 26                                     TesSeRact CXL V5.5 User's Guide
  1767.                          Header File Descriptions
  1768.  
  1769.                               C Header Files
  1770.  
  1771.   <TCXLdef.h>  : Miscellaneous function prototypes and definitions. This
  1772.           file is also included by all other <TCXLxxx.h> header files
  1773.           and so user programs normally need not include this file.
  1774.   <TCXL_tc.h   : Compiler specific definitions for Turbo C/C++
  1775.   <TCXL_msc.h> : Compiler specific definitions for Microsoft C
  1776.   <TCXL_ztc.h> : Compiler specific definitions for Zorctech C/C++
  1777.   <TCXLerr.h>  : Global error equates
  1778.   <TCXLmnu.h>  : Menu System declarations and prototypes
  1779.   <TCXLent.h>  : Entry System declarations and prototypes
  1780.   <TCXLhlp.h>  : Help System declarations and prototypes
  1781.   <TCXLsel.h>  : Selection System declarations and prototypes
  1782.   <TCXLwin.h>  : Window System declarations and prototypes
  1783.   <TCXLvid.h>  : Display System and Video Access Subsystem declarations
  1784.           and prototypes
  1785.   <TCXLkey.h>  : Input System and Keyboard Access Subsystem declarations
  1786.           and prototypes
  1787.   <TCXLcod.h>  : Equates for Keyboard Codes
  1788.   <TCXLstr.h>  : Strings System declarations and prototypes
  1789.   <TCXLhdw.h>  : Information Subystem declarations and prototypes
  1790.   <TCXLmem.h>  : Memory Subsystem declarations and prototypes
  1791.   <TCXLprn.h>  : Printer Subsystem declarations and prototypes
  1792.   <TCXLdos.h>  : OpSys Subsystem declarations and prototypes
  1793.   <TCXLvid.h>  : Display System and Video Access Subsystem declarations
  1794.           and prototypes
  1795.   <TCXLatr.h>  : Video attribute equates
  1796.   <TCXLkey.h>  : Input System and Keyboard Access Subsystem declarations
  1797.           and prototypes
  1798.   <TCXLmou.h>  : Mouse Access Subsystem declarations and prototypes
  1799.   <TCXLcvt.h>  : Conversion Subsystem declarations and prototypes
  1800.   <TCXLfmt.h>  : Format Control Subsystem declarations and prototypes
  1801.   <TCXLfar.h>  : Near/Far Subsystem declarations and prototypes
  1802.  
  1803.   <_TCXLhlp.h> : Internal Shorthand equates
  1804.   <_TCXLent.h>
  1805.   <_TCXLmnu.h>
  1806.   <_TCXLvid.h>
  1807.   <_TCXLwin.h>
  1808.  
  1809.  
  1810.                           Assembler Include Files
  1811.  
  1812.   <TCXLASM.MAC> : Internal assembler macro file.
  1813.   <TCXLKEY.INC> : ASM analogue of <TCXLkey.h>.
  1814.   <TCXLMOU.INC> : ASM analogue of <TCXLmou.h>.
  1815.   <TCXLVID.INC> : ASM analogue of <TCXLvid.h>.
  1816.   <TCXLMEM.INC> : ASM analogue of <TCXLmem.h>
  1817.  
  1818.  
  1819.  
  1820.  
  1821.  
  1822.  
  1823.  
  1824.  
  1825. TesSeRact CXL V5.5 User's Guide                                     Page 27
  1826.                              Predefined Types
  1827.  
  1828. Once you  master the  strong typing  used by the TCXL routines, reading the
  1829. code should  be very  simple.   However, because the code has been designed
  1830. for maximum  portability, the C code must rely heavily on the pre-processor
  1831. to handle all the differents between compilers and operating environments.
  1832.  
  1833. Therefore, we  strongly urge  you to  study typing  and naming  conventions
  1834. described below.  Once you get the hang of it, it will become simple.
  1835.  
  1836.  
  1837.                     Portability and Shorthand Notation
  1838.  
  1839.             /* compiler dependent; see TCXL_???.H for specific */
  1840.             /*   declarations                                  */
  1841.   #define   CDC     cdecl
  1842.   #define   PAS     pascal
  1843.   #define   FAR     far
  1844.   #define   NEAR    near
  1845.  
  1846.  
  1847.   #define  CON      const               /* shorthand notation   */
  1848.   #define  CTYP     PAS                 /*  for standard typing */
  1849.   #define  GBL      extern
  1850.   #define  LCL      static
  1851.   #define  REG      register
  1852.   #define  SIZ(c)   sizeof(c)
  1853.   #define  TYP      typedef
  1854.   #define  UNS      unsigned
  1855.   #define  VOID     void
  1856.   #define  VOL      volatile
  1857.  
  1858.  
  1859.   #ifdef    __cplusplus
  1860.   #  define NOARG                     /* remove C cruft for C++ */
  1861.   #else
  1862.   #  define NOARG   void                 /* leave C cruft for C */
  1863.   #endif
  1864.  
  1865.   #ifdef    EOS
  1866.   #  undef  EOS
  1867.   #endif
  1868.   #define   EOS     '\x00'                     /* End_Of_String */
  1869.  
  1870.   #ifdef    NUL
  1871.   #  undef  NUL                                      /* NulTerm */
  1872.   #endif
  1873.   #define   NUL   EOS                        /* ASCII NULl char */
  1874.  
  1875.   #define   BEL   '\x07'                /* Common control codes */
  1876.   #define   BS    '\x08'
  1877.   #define   HT    '\x09'
  1878.   #define   LF    '\x0A'
  1879.   #define   FF    '\x0C'
  1880.   #define   CR    '\x0D'
  1881.   #define   ESC   '\x1B'
  1882.  
  1883.  
  1884. Page 28                                     TesSeRact CXL V5.5 User's Guide
  1885.   #ifdef    EOF
  1886.   #  undef  EOF
  1887.   #endif
  1888.   #define   EOF     (-1)                         /* End_Of_File */
  1889.   #define   CpmEof '\x1A'         /* CP/M-style [PDP-8!] ^Z EOF */
  1890.   #define   CtlZ    CpmEof                         /* ... alias */
  1891.  
  1892.   #ifdef    FALSE
  1893.   #  undef  FALSE
  1894.   #endif
  1895.   #ifdef    TRUE
  1896.   #  undef  TRUE
  1897.   #endif
  1898.   #define   FALSE   0                      /* Boolean absolutes */
  1899.   #define   TRUE    1
  1900.   #define   YES     TRUE                         /* ... aliases */
  1901.   #define   NO      FALSE
  1902.   #define   ON      TRUE
  1903.   #define   OFF     FALSE
  1904.  
  1905.                                          /* Error return values */
  1906.   #define   ERR_MEM (-2)                  /* Allocation failure */
  1907.   #define   ERR_ARG (-1)                  /* argument failure   */
  1908.   #define   ERR_NUL 0                     /* successful return  */
  1909.  
  1910.  
  1911.                 Standard Object, Pointer and Indirect Types
  1912.  
  1913.   TYP   VOID         *AnyP, **AnyI;       /* anonymous pointer  */
  1914.   TYP   VOID   FAR   *AnyFP;              /* ... far-pointer    */
  1915.   TYP   char         ChrT, *ChrP, **ChrI; /* 8-bit char         */
  1916.   TYP   ChrT   FAR   *ChrFP;              /* ... far-pointer    */
  1917.   TYP   ChrT         *StrP, **StrI;       /* NulTerm string     */
  1918.   TYP   UNS    char  BytT, *BytP, **BytI; /* 8-bit unsigned byte*/
  1919.   TYP   BytT   FAR   *BytFP;              /* ... far-pointer    */
  1920.   TYP   BytT         FlgT, *FlgP, **FlgI; /* 8-bit Boolean flag */
  1921.   TYP   short        IntT, *IntP, **IntI; /* 16-bit signed int  */
  1922.   TYP   IntT   FAR   *IntFP;              /* ... far-pointer    */
  1923.   TYP   UNS    short WrdT, *WrdP, **WrdI; /*16-bit unsigned word*/
  1924.   TYP   WrdT   FAR   *WrdFP;              /* ... far-pointer    */
  1925.   TYP   long         LngT, *LngP, **LngI; /* 32-bit signed long */
  1926.   TYP   LngT   FAR   *LngFP;              /* ... far-pointer    */
  1927.   TYP   UNS    long  DwdT, *DwdP, **DwdI; /*32-bit unsigned dwrd*/
  1928.   TYP   DwdT   FAR   *DwdFP;              /* ... far-pointer    */
  1929.   TYP   float        FltT, *FltP, **FltI; /* 32-bit real        */
  1930.   TYP   double DblT, *DblP, **DblI;       /* 64-bit real        */
  1931.   TYP   WrdT   LenT, *LenP, **LenI;       /* alias for size_t   */
  1932.   TYP   LngT   PosT, *PosP, **PosI;       /* alias for fpos_t   */
  1933.   TYP   WrdT   NdxT, *NdxP, **NdxI;       /* array-indices      */
  1934.   TYP   IntT   ArgT;                      /* bytes as ints      */
  1935.   TYP   WrdT   KeyT;                      /* ASCII/Scan Code    */
  1936.                                           /* ..returned by BIOS */
  1937.  
  1938.  
  1939.  
  1940.  
  1941.  
  1942.  
  1943. TesSeRact CXL V5.5 User's Guide                                     Page 29
  1944.                         TCXL-specific type-aliases
  1945.  
  1946.   TYP   BytT   AtrT, *AtrP;              /* video attribute     */
  1947.   TYP   WrdT   KeyT, *KeyP;              /* keycode (char/scan) */
  1948.   TYP   IntT   TagT, *TagP;              /* item/field/help tag */
  1949.   TYP   IntT   WndT, *WndP;              /* window handle       */
  1950.  
  1951.  
  1952.  
  1953.  
  1954.                        Common Function Pointer Types
  1955.  
  1956.   TYP   VOID   (CTYP *VfvCP)(NOARG); /* VOID (*function)(NOARG) */
  1957.   TYP   VOID   (CTYP *VfiCP)(IntT);  /* VOID (*function)(IntT)  */
  1958.   TYP   IntT   (CTYP *IfcpCP)(ChrP); /* IntT (*function)(ChrP)  */
  1959.   TYP   WrdT   (CTYP *WfipCP)(IntP); /* WrdT (*function)(IntP)  */
  1960.  
  1961.  
  1962.  
  1963.                       Structures, Unions and Typedefs
  1964.  
  1965. TCXL uses  a simple naming convention for all structures and typedefs.  If,
  1966. for example  a structure is defined as "struct Kcod", it would be typedef'd
  1967. as "KcodT",  and a a pointer to an object would be "KcodP".  As an example,
  1968. see the following code fragment:
  1969.  
  1970.   #include <TCXLkey.h>
  1971.  
  1972.   union Kcod KbdCode;       /* keycode union declaration */
  1973.   KcodT KbdCode1;           /* Identical declaration using typedef */
  1974.   KcodP KbdPtr;             /* pointer to keycode type */
  1975.  
  1976.   ...
  1977.  
  1978.   KbdPtr = &KbdCode;        /* Assign pointer to union */
  1979.   KbdPtr = &KbdCode1;       /* same thing */
  1980.  
  1981.  
  1982. We are aware, however, that there is a tendency for C programmers to resist
  1983. change.   With the  coming of  C++, the success of strongly-typed languages
  1984. like Pascal,  and  the  advent  of  multiple  operating  platforms,  it  is
  1985. necessary for the modern programmer to write readable, portable, consistent
  1986. code.
  1987.  
  1988. If, however,  you prefer to use "char *" instead of "ChrP" in your function
  1989. declarations, your compiler won't complain.  So go ahead.
  1990.  
  1991. We have found, however, that after about a week, you won't want to go back.
  1992.  
  1993.  
  1994.  
  1995.  
  1996.  
  1997.  
  1998.  
  1999.  
  2000.  
  2001.  
  2002. Page 30                                     TesSeRact CXL V5.5 User's Guide
  2003. ---------------------------------------------------------------------------
  2004.  
  2005.                                 Menu System
  2006.  
  2007.  
  2008. ---------------------------------------------------------------------------
  2009.  
  2010. NAME.........Mctl
  2011.  
  2012. DESCRIPTION
  2013.      This is  the menu  control structure.   Through the global variable
  2014.      _MnuCtl (Page  47), TCXL  uses this  structure for  access  to  the
  2015.      menuing features.
  2016.  
  2017. DECLARATION
  2018.   struct Mctl                     /* Menu-control object */
  2019.   {
  2020.         MdfP   mtop;                      /* top menu           */
  2021.         MdfP   mcur;                      /* current menu       */
  2022.         IntT   mmnu;                      /* current menu level */
  2023.         IntT   mitm;                      /* item level         */
  2024.   }
  2025.  
  2026.   TYP struct Mctl MctlT;
  2027.  
  2028. ---------------------------------------------------------------------------
  2029.  
  2030.  
  2031.  
  2032.  
  2033.  
  2034.  
  2035.  
  2036.  
  2037.  
  2038.  
  2039.  
  2040.  
  2041.  
  2042.  
  2043.  
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050.  
  2051.  
  2052.  
  2053.  
  2054.  
  2055.  
  2056.  
  2057.  
  2058.  
  2059.  
  2060.  
  2061. TesSeRact CXL V5.5 User's Guide                                     Page 31
  2062. NAME.........Idf
  2063.  
  2064. DESCRIPTION
  2065.      This is  the Item  Definition structure  for individual menu items.
  2066.      This is used internally by the TCXL routines.
  2067.  
  2068. DECLARATION
  2069.   struct Idf                      /* Menu-item object */
  2070.   {
  2071.         IdfP   iprv;                  /* previous Item object   */
  2072.         IdfP   inxt;                  /* next Item object       */
  2073.         MdfP   isub;                  /* submenu Menu object    */
  2074.         ChrP   istr;                  /* selection string       */
  2075.         ChrP   itxt;                  /* text description       */
  2076.         VfvCP  isel;                  /* selection function     */
  2077.         VfvCP  ibef;                  /* "before" function      */
  2078.         VfvCP  iaft;                  /* "after"  function      */
  2079.         KeyT   ikey;                  /* hot key                */
  2080.         TagT   itag;                  /* tag ID                 */
  2081.         TagT   ihlp;                  /* help tag               */
  2082.         VposT  ispo;                  /* select text position   */
  2083.         VposT  idpo;                  /* description position   */
  2084.         AtrT   idat;                  /* description attribute  */
  2085.         BytT   ichr;                  /* quick select char      */
  2086.         BytT   imsk;                  /* feature mask           */
  2087.         BytT   ilen;                  /* selection-text length  */
  2088.         VposT  icpo;                  /* center position        */
  2089.   };
  2090.  
  2091.   TYP struct Idf IdfT, *IdfP;
  2092.  
  2093.  
  2094. ---------------------------------------------------------------------------
  2095.  
  2096.  
  2097.  
  2098.  
  2099.  
  2100.  
  2101.  
  2102.  
  2103.  
  2104.  
  2105.  
  2106.  
  2107.  
  2108.  
  2109.  
  2110.  
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116.  
  2117.  
  2118.  
  2119.  
  2120. Page 32                                     TesSeRact CXL V5.5 User's Guide
  2121. NAME.........Mdf
  2122.  
  2123. DESCRIPTION
  2124.      This is  the menu  definition structure,  used  internally  by  the
  2125.      library routines for menu handling.
  2126.  
  2127. DECLARATION
  2128.   struct Mdf                      /* Menu object */
  2129.   {
  2130.         MdfP   mprv;                /* previous menu object     */
  2131.         MdfP   mnxt;                /* next menu object         */
  2132.         MdfP   mpar;                /* parent menu object       */
  2133.         IdfP   mtop;                /* head menu item           */
  2134.         IdfP   mcur;                /* current menu item        */
  2135.         VfvCP  mopn;                /* post-opening function    */
  2136.         TagT   mtag;                /* selected tag ID          */
  2137.         VposT  mbeg;                /* start position           */
  2138.         VposT  mend;                /* end position             */
  2139.         BoxT   mbox;                /* border type              */
  2140.         AtrT   mwat;                /* window attribute         */
  2141.         BytT   mtyp;                /* type mask                */
  2142.         BytT   mwid;                /* width of menu bar        */
  2143.         BytT   mofs;                /* text offset              */
  2144.         AtrT   mtat;                /* text attribute           */
  2145.         AtrT   msat;                /* selection char attribute */
  2146.         AtrT   mnat;                /* non-selectable attribute */
  2147.         AtrT   mbat;                /* selection bar attribute  */
  2148.   };
  2149.  
  2150.   TYP struct Mdf MdfT, *MdfP;
  2151.  
  2152.  
  2153. ---------------------------------------------------------------------------
  2154.  
  2155.  
  2156.  
  2157.  
  2158.  
  2159.  
  2160.  
  2161.  
  2162.  
  2163.  
  2164.  
  2165.  
  2166.  
  2167.  
  2168.  
  2169.  
  2170.  
  2171.  
  2172.  
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179. TesSeRact CXL V5.5 User's Guide                                     Page 33
  2180.  
  2181.                                Entry System
  2182.  
  2183.  
  2184. ---------------------------------------------------------------------------
  2185.  
  2186. NAME.........Fdf
  2187.  
  2188. DESCRIPTION
  2189.      This is the structure for an individual entry field.
  2190.  
  2191. DECLARATION
  2192.   struct Fdf                      /* field-definition object */
  2193.   {
  2194.         FdfP   fprv;                     /* previous Fdft       */
  2195.         FdfP   fnxt;                     /* next Fdft           */
  2196.         ChrP   fstr;                     /* receiving string    */
  2197.         ChrP   fbfr;                     /* temp receive string */
  2198.         ChrP   ffmt;                     /* input format string */
  2199.         IfcpCP fval;                     /* validation function */
  2200.         VfvCP  fbef;                     /* "before" function   */
  2201.         VfvCP  faft;                     /* "after"  function   */
  2202.         KeyT   fkey;                     /* hot-key             */
  2203.         WrdT   fmsk;                     /* feature mask        */
  2204.         IntT   ftag;                     /* tag ID              */
  2205.         IntT   fhlp;                     /* help category       */
  2206.         VposT  fpos;                     /* Input position      */
  2207.         BytT   fctl;                     /* control flags       */
  2208.         BytT   flen;                     /* length of buffer    */
  2209.         BytT   fdec;                     /* decimal position    */
  2210.         BytT   ffut;                     /* reserved for future */
  2211.   };
  2212.  
  2213.   TYP struct Fdf FdfT, *FdfP;
  2214.  
  2215.  
  2216. ---------------------------------------------------------------------------
  2217.  
  2218.  
  2219.  
  2220.  
  2221.  
  2222.  
  2223.  
  2224.  
  2225.  
  2226.  
  2227.  
  2228.  
  2229.  
  2230.  
  2231.  
  2232.  
  2233.  
  2234.  
  2235.  
  2236.  
  2237.  
  2238. Page 34                                     TesSeRact CXL V5.5 User's Guide
  2239. NAME.........Edf
  2240.  
  2241. DESCRIPTION
  2242.      This is the internal structure for an entry form.
  2243.  
  2244. DECLARATION
  2245.   struct Edf                      /* Entry-definition object */
  2246.   {
  2247.         FdfP   etop;                 /* head FdfT               */
  2248.         FdfP   efld;                 /* current FdfT            */
  2249.         WfipCP eget;                 /* alternate get function  */
  2250.         WrdP   etrm;                 /* terminating key pointer */
  2251.         ChrP   efmt;                 /* format string           */
  2252.         ChrP   ebfr;                 /* buffer string           */
  2253.         ChrP   ebas;                 /* buffer base             */
  2254.         ChrP   esep;                 /* valid word separators   */
  2255.         VposT  epos;                 /* window position         */
  2256.         BytT   elen;                 /* buffer-length           */
  2257.         BytT   edec;                 /* decimal position        */
  2258.         BytT   ectl;                 /* field control flags     */
  2259.         AtrT   efat;                 /* field attribute         */
  2260.         BytT   etat;                 /* text attribute          */
  2261.         BytT   efut;                 /* reserved for future     */
  2262.   };
  2263.  
  2264.   TYP struct Edf, EdfT, *EdfP;
  2265.  
  2266.  
  2267. ---------------------------------------------------------------------------
  2268.  
  2269.                                 Help System
  2270.  
  2271.  
  2272. ---------------------------------------------------------------------------
  2273.  
  2274.  
  2275.  
  2276.  
  2277.  
  2278.  
  2279.  
  2280.  
  2281.  
  2282.  
  2283.  
  2284.  
  2285.  
  2286.  
  2287.  
  2288.  
  2289.  
  2290.  
  2291.  
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297. TesSeRact CXL V5.5 User's Guide                                     Page 35
  2298. NAME.........Hctl
  2299.  
  2300. DESCRIPTION
  2301.      This is  the control  structure for  the help  system.   It is used
  2302.      internally by  the TCXL  routines.  Please note that since the Help
  2303.      Stack is  declared as  a #define,  and the  stack itself  is global
  2304.      buffer, a  simple recompile will allow the programmer to change the
  2305.      size of the help stack.
  2306.  
  2307. DECLARATION
  2308.   struct Hctl                     /* Help-info object */
  2309.   {
  2310.         TagT   hstk[HLP_STK];          /* help stack            */
  2311.         ChrP   hfil;                   /* help file name        */
  2312.         VfvCP  hopn;                   /* open function         */
  2313.         IntT   hptr;                   /* help stack pointer    */
  2314.         KeyT   hkey;                   /* help hot key          */
  2315.         AtrT   hwat;                   /* window attribute      */
  2316.         AtrT   htat;                   /* text attribute        */
  2317.         AtrT   hsat;                   /* selection attribute   */
  2318.         AtrT   hbat;                   /* bar attribute         */
  2319.         VposT  hbeg;                   /* window start position */
  2320.         VposT  hend;                   /* window end position   */
  2321.         BytT   hbox;                   /* window border type    */
  2322.         BytT   hflg;                   /* display "Help" title? */
  2323.   };
  2324.  
  2325.   TYP struct Hctl HctlT, *HctlP;
  2326.  
  2327.  
  2328. ---------------------------------------------------------------------------
  2329.  
  2330.                                Window System
  2331.  
  2332.  
  2333. ---------------------------------------------------------------------------
  2334.  
  2335. NAME.........Box
  2336.  
  2337. DESCRIPTION
  2338.      This is  the object  that describes  a window's  box  (Border),  or
  2339.      frame.
  2340.  
  2341. DECLARATION
  2342.   struct Box                      /* Window frame object */
  2343.   {
  2344.         BytT   btyp;                               /* box type  */
  2345.         AtrT   batr;                               /* attribute */
  2346.   }
  2347.  
  2348.   TYP struct Box BoxT, *BoxP;
  2349.  
  2350.  
  2351.  
  2352.  
  2353.  
  2354.  
  2355.  
  2356. Page 36                                     TesSeRact CXL V5.5 User's Guide
  2357. ---------------------------------------------------------------------------
  2358.  
  2359. NAME.........Ttl
  2360.  
  2361. DESCRIPTION
  2362.      This is the object that describes a window's title.
  2363.  
  2364. DECLARATION
  2365.   struct Ttl                      /* Window-title object */
  2366.   {
  2367.         ChrP   tstr;                               /* string    */
  2368.         BytT   tpos;                               /* position  */
  2369.         AtrT   tatr;                               /* attribute */
  2370.   };
  2371.  
  2372.   TYP struct Ttl TtlT, *TtlP;
  2373.  
  2374. ---------------------------------------------------------------------------
  2375.  
  2376. NAME.........Wdf
  2377.  
  2378. DESCRIPTION
  2379.      This is the structure for each individual window created with TCXL.
  2380.  
  2381. DECLARATION
  2382.   struct Wdf                      /* Window-definition object */
  2383.   {
  2384.         WdfP   wprv;                       /* previous WdfT     */
  2385.         WdfP   wnxt;                       /* next WdfT         */
  2386.         VCelP  wbfr;                       /* buffer            */
  2387.         VCelP  wsbf;                       /* shadow buffer     */
  2388.         TtlT   wttl;                       /* title             */
  2389.         WndT   whdl;                       /* handle            */
  2390.         TagT   whlp;                       /* help category     */
  2391.         VposT  wbeg;                       /* start position    */
  2392.         VposT  wend;                       /* end position      */
  2393.         VposT  wpos;                       /* cursor position   */
  2394.         BoxT   wfrm;                       /* border            */
  2395.         AtrT   wdat;                       /* default attribute */
  2396.         AtrT   wcat;                       /* current attribute */
  2397.         AtrT   wsat;                       /* shadow attribute  */
  2398.         BytT   wbrd;                       /* border ? 1 : 0    */
  2399.   };
  2400.  
  2401.   TYP struct Wdf WdfT, *WdfP;
  2402.  
  2403.  
  2404. ---------------------------------------------------------------------------
  2405.  
  2406.  
  2407.  
  2408.  
  2409.  
  2410.  
  2411.  
  2412.  
  2413.  
  2414.  
  2415. TesSeRact CXL V5.5 User's Guide                                     Page 37
  2416. NAME.........Wctl
  2417.  
  2418. DESCRIPTION
  2419.      This is  the  global  window-controlling  structure  for  the  TCXL
  2420.      system.
  2421.  
  2422. DECLARATION
  2423.   struct Wctl                     /* Window-control object */
  2424.   {
  2425.         Wdfp   wact;                 /* active window           */
  2426.         WdfP   whid;                 /* head hidden window      */
  2427.  
  2428.                                      /* fill-function           */
  2429.         VOID   (CTYP *wfun)(VposT, VposT, IntT, IntT);
  2430.  
  2431.         WndT   whdl;                 /* last handle assigned    */
  2432.         TagT   whlp;                 /* current help category   */
  2433.         IntT   werr;                 /* last error num          */
  2434.         IntT   wopn;                 /* total open windows      */
  2435.         BytT   wesc;                 /* check for Esc in input? */
  2436.         BytT   wtab;                 /* TTY output tab width    */
  2437.         BytT   wfil;                 /* fill character          */
  2438.         BytT   wflg;                 /* reserved flag byte      */
  2439.   };
  2440.  
  2441.   TYP struct Wctl WctlT, *WctlP;
  2442.  
  2443.  
  2444. ---------------------------------------------------------------------------
  2445.  
  2446.                            Information Subsystem
  2447.  
  2448.  
  2449. ---------------------------------------------------------------------------
  2450.  
  2451. NAME.........Hdw
  2452.  
  2453. DESCRIPTION
  2454.      This structure  is designed  to hold information about the hardware
  2455.      used by the individual machine.  It is not totally reliable, but it
  2456.      does use the BIOS services to gather the information.
  2457.  
  2458. DECLARATION
  2459.   struct Hdw                      /* Hardware-data object */
  2460.   {
  2461.         BytT   hpar;                          /* parallel-ports */
  2462.         BytT   Hser;                          /* serial-ports   */
  2463.         BytT   Hdrv;                          /* floppy-drives  */
  2464.         BytT   Hflg;                          /* option-flags   */
  2465.   };
  2466.   TYP struct Hdw HdwT, *HdwP;
  2467.  
  2468.  
  2469.  
  2470.  
  2471.  
  2472.  
  2473.  
  2474. Page 38                                     TesSeRact CXL V5.5 User's Guide
  2475. ---------------------------------------------------------------------------
  2476.  
  2477. NAME.........Tcxl
  2478.  
  2479. DESCRIPTION
  2480.      This is  the global  TCXL control object.  It contains global error
  2481.      and configuration information about the operating environment.
  2482.  
  2483. DECLARATION
  2484.   struct Tcxl                     /* TCXL-control object */
  2485.   {
  2486.         IntT   terr;                      /* error code         */
  2487.         IntT   tdbg;                      /* debug-level        */
  2488.         WrdT   tsys;                      /* operating system   */
  2489.         WrdT   tenv;                      /* environment bits   */
  2490.         WrdT   tcfg;                      /* configuration bits */
  2491.   };
  2492.  
  2493.   TYP struct Tcxl TcxlT, *TcxlP;
  2494.  
  2495. ---------------------------------------------------------------------------
  2496.  
  2497.  
  2498.  
  2499.  
  2500.  
  2501.  
  2502.  
  2503.  
  2504.  
  2505.  
  2506.  
  2507.  
  2508.  
  2509.  
  2510.  
  2511.  
  2512.  
  2513.  
  2514.  
  2515.  
  2516.  
  2517.  
  2518.  
  2519.  
  2520.  
  2521.  
  2522.  
  2523.  
  2524.  
  2525.  
  2526.  
  2527.  
  2528.  
  2529.  
  2530.  
  2531.  
  2532.  
  2533. TesSeRact CXL V5.5 User's Guide                                     Page 39
  2534.  
  2535.                              Memory Subsystem
  2536.  
  2537.  
  2538. ---------------------------------------------------------------------------
  2539.  
  2540. NAME........._Mem
  2541.  
  2542. DESCRIPTION
  2543.      This is  the control  block and  information header  for the Memory
  2544.      Subsystem.
  2545.  
  2546. DECLARATION
  2547.   struct       _Mem               /* Memory-control object */
  2548.   {
  2549.         BytT   mMflg                   /* Memory flags          */
  2550.         BytT   mDpro;                  /* DPMI Processor        */
  2551.         WrdT   mDflg;                  /* DPMI Flags            */
  2552.         DwdT   mDent;                  /* DPMI entry point      */
  2553.         WrdT   mDver;                  /* DPMI version          */
  2554.         WrdT   mVver;                  /* VCPI Version          */
  2555.         WrdT   mEseg;                  /* EMS Base Segment      */
  2556.         WrdT   mEver;                  /* EMS Version           */
  2557.         WrdT   mEfre;                  /* EMS Free (16kb page)  */
  2558.         WrdT   mEtot;                  /* EMS Total (16kb page) */
  2559.         BytT   mEerr;                  /* EMS Error Code        */
  2560.         BytT   mXerr;                  /* XMS Error Code        */
  2561.         WrdT   mXver;                  /* XMS Version           */
  2562.         DwdT   mXent;                  /* XMS Entry Point       */
  2563.         WrdT   mXint;                  /* XMS Internal Version  */
  2564.         WrdT   mHfre;                  /* HMA free (para)       */
  2565.         WrdT   mXtot;                  /* XMS total free (1k)   */
  2566.         WrdT   mXlrg;                  /* XMS largest free (1k) */
  2567.         WrdT   mUfre;                  /* Largest available UMB */
  2568.   };
  2569.  
  2570.   TYP struct _Mem _MemT;
  2571.  
  2572.  
  2573. ---------------------------------------------------------------------------
  2574.  
  2575.  
  2576.  
  2577.  
  2578.  
  2579.  
  2580.  
  2581.  
  2582.  
  2583.  
  2584.  
  2585.  
  2586.  
  2587.  
  2588.  
  2589.  
  2590.  
  2591.  
  2592. Page 40                                     TesSeRact CXL V5.5 User's Guide
  2593.  
  2594.                               OpSys Subsystem
  2595.  
  2596.  
  2597. ---------------------------------------------------------------------------
  2598.  
  2599. NAME.........Ffb
  2600.  
  2601. DESCRIPTION
  2602.      This is  the DOS  DTA structure,  used  by  the  FindFirst/FindNext
  2603.      functions.
  2604.  
  2605. DECLARATION
  2606.  
  2607.   struct Ffb                      /* findfirst/findnext DTA */
  2608.   {
  2609.         BytT   fdos[21];
  2610.         BytT   fatr;
  2611.         WrdT   ftim;
  2612.         WrdT   fdat;
  2613.         LngT   fsiz;
  2614.         ChrT   fnam[13];
  2615.   };
  2616.  
  2617.   TYP struct Ffb FfbT, *FfbP;
  2618.  
  2619.  
  2620. ---------------------------------------------------------------------------
  2621.  
  2622.                           Video Access Subsystem
  2623.  
  2624.  
  2625. ---------------------------------------------------------------------------
  2626.  
  2627. NAME.........Vcel
  2628.  
  2629. DESCRIPTION
  2630.      This  is   the  structure   for   a   video   "cell",   i.e.,   the
  2631.      character/attribute pair  that  controls  what  you  see  and  what
  2632.      attributes it has.
  2633.  
  2634. DECLARATION
  2635.   union Vcel                                      /* Video cell */
  2636.   {
  2637.         WrdT   cwrd;                            /* overlay word */
  2638.         struct
  2639.         {
  2640.                ChrT  chr;                       /* character    */
  2641.                BytT  atr;                       /* attribute    */
  2642.         } c;
  2643.   };
  2644.  
  2645.   TYP union Vcel VcelT, *VcelP;
  2646.  
  2647.  
  2648.  
  2649.  
  2650.  
  2651. TesSeRact CXL V5.5 User's Guide                                     Page 41
  2652. ---------------------------------------------------------------------------
  2653.  
  2654. NAME.........Vcse
  2655.  
  2656. DESCRIPTION
  2657.      This is the structure that stores the state of the video cursor.
  2658.  
  2659. DECLARATION
  2660.   union Vcse                                    /* Video cursor */
  2661.   {
  2662.         WrdT   cwrd;                            /* overlay word */
  2663.         struct
  2664.         {
  2665.                BytT  end;                         /* stop line  */
  2666.                BytT  beg;                         /* start line */
  2667.         } c;
  2668.   };
  2669.  
  2670.   TYP union Vcse VcseT, *VcseP;
  2671.  
  2672.  
  2673. ---------------------------------------------------------------------------
  2674.  
  2675. NAME.........Vpos
  2676.  
  2677. DESCRIPTION
  2678.      This is the structure that holds the current cursor position on the
  2679.      video display.
  2680.  
  2681. DECLARATION
  2682.   union Vpos                                  /* Video position */
  2683.   {
  2684.         WrdT   pwrd;                            /* overlay word */
  2685.         struct
  2686.         {
  2687.                BytT  col;                       /* column       */
  2688.                BytT  row;                       /* row          */
  2689.         } p;
  2690.   };
  2691.  
  2692.   TYP union Vpos VposT, *VposP;
  2693.  
  2694.  
  2695. ---------------------------------------------------------------------------
  2696.  
  2697.  
  2698.  
  2699.  
  2700.  
  2701.  
  2702.  
  2703.  
  2704.  
  2705.  
  2706.  
  2707.  
  2708.  
  2709.  
  2710. Page 42                                     TesSeRact CXL V5.5 User's Guide
  2711. NAME.........Vctl
  2712.  
  2713. DESCRIPTION
  2714.      This is  the video  control structure.   It  is used  to  interface
  2715.      between the  window system  and the  physical layout  of the  video
  2716.      hardware.
  2717.  
  2718. DECLARATION
  2719.   struct Vctl                     /* video-control object */
  2720.   {     WrdT   vseg;                 /* video buffer segment    */
  2721.         BytT   vhdw;                 /* video adapter type      */
  2722.         BytT   vflg;                 /* video flag byte         */
  2723.         BytT   vpag;                 /* display-page            */
  2724.         IntT   vwid;                 /* columns wide            */
  2725.         IntT   vdep;                 /* rows deep               */
  2726.         VcseT  vcur;                 /* cusor-save              */
  2727.         BytT   vuvf;                 /* Ultravision Flags       */
  2728.         BytT   vuvc;                 /* Ultravision Card Code   */
  2729.         BytT   vuvm;                 /* Ultravision Text Mode   */
  2730.         BytT   vfut;                 /* Reserved for future use */
  2731.   };
  2732.  
  2733.   TYP struct Vctl VctlT, *VctlP;
  2734.  
  2735.  
  2736. ---------------------------------------------------------------------------
  2737.  
  2738.                          Keyboard Access Subsystem
  2739.  
  2740.  
  2741. ---------------------------------------------------------------------------
  2742.  
  2743. NAME.........Kcod
  2744.  
  2745. DESCRIPTION
  2746.      This is  a union  that holds  the complete  keyboard ASCII/ScanCode
  2747.      pair, as  returned by  the  BIOS  and  placed  into  the  machine's
  2748.      keyboard buffer.
  2749.  
  2750.  
  2751. DECLARATION
  2752.   union Kcod                                /* complete keycode */
  2753.   {
  2754.         KeyT   ckey;                            /* word overlay */
  2755.         struct
  2756.         {
  2757.                BytT    asc;                     /* ASCII        */
  2758.                BytT    scn;                     /* Scan Code    */
  2759.         }      c;
  2760.   };
  2761.  
  2762.   TYP union Kcod KcodT, *KcodP;
  2763.  
  2764.  
  2765.  
  2766.  
  2767.  
  2768.  
  2769. TesSeRact CXL V5.5 User's Guide                                     Page 43
  2770. ---------------------------------------------------------------------------
  2771.  
  2772. NAME.........Kbnd
  2773.  
  2774. DESCRIPTION
  2775.      This structure  is used  internally to  translate keystrokes, or to
  2776.      execute a  function when  a particular  key  is  pressed.    It  is
  2777.      implemented as a double-linked list of structures.
  2778.  
  2779. DECLARATION
  2780.   struct Kbnd                     /* Key-binding object */
  2781.   {
  2782.         KbndP  bprv;                          /* previous       */
  2783.         KbndP  bnxt;                          /* next           */
  2784.         VfvCP  bfun;                          /* bound function */
  2785.         KeyT   bkey;                          /* trap keycode   */
  2786.         KeyT   brtn;                          /* return keycode */
  2787.   };
  2788.  
  2789.   TYP struct Kbnd KbndT, *KbndP;
  2790.  
  2791.  
  2792. ---------------------------------------------------------------------------
  2793.  
  2794. NAME.........Kctl
  2795.  
  2796. DESCRIPTION
  2797.      This structure  is the  Keyboard Control  structure.   All keyboard
  2798.      operations are  controlled by  this, referenced  through the global
  2799.      variable _KeyCtl.   The internal keyboard "queue" is implemented as
  2800.      a ring buffer, and also controlled within this structure.
  2801.  
  2802. DECLARATION
  2803.   struct Kctl                     /* key-control object */
  2804.   {
  2805.         BytT   kflg;                    /* control-flag         */
  2806.         BytT   ksrc;                    /* keycode              */
  2807.         IntT   kbeg;                    /* key-queue head       */
  2808.         IntT   kend;                    /* key-queue tail       */
  2809.         IntT   kcnt;                    /* key-queue count      */
  2810.         IntT   kmax;                    /* key-queue size       */
  2811.         KeyP   kbas;                    /* key-queue base       */
  2812.         KbndP  kbnd;                    /* key-binding          */
  2813.         VfvCP  kidl;                    /* idle-loop function   */
  2814.         KeyT   khlp;                    /* help keycode         */
  2815.         VfvCP  kfun;                    /* help function        */
  2816.   }
  2817.  
  2818.   TYP struct Kctl KctlT, *KctlP;
  2819.  
  2820.  
  2821.  
  2822.  
  2823.  
  2824.  
  2825.  
  2826.  
  2827.  
  2828. Page 44                                     TesSeRact CXL V5.5 User's Guide
  2829. ---------------------------------------------------------------------------
  2830.  
  2831.                           Mouse Access Subsystem
  2832.  
  2833.  
  2834. ---------------------------------------------------------------------------
  2835.  
  2836. NAME.........Mou
  2837.  
  2838. DESCRIPTION
  2839.      This is  the mouse  control  block,  accessed  through  the  global
  2840.      variable _MouCtl.
  2841.  
  2842. DECLARATION
  2843.   struct Mou                      /* mouse-control object */
  2844.   {                               /* 16-level mouse stack */
  2845.         BytT   mlvl;                   /* Head support-level    */
  2846.         BytT   mcol;                   /* Head support-level    */
  2847.         BytT   mrow;                   /* Head support-level    */
  2848.         BytT   mstk[45];               /*    rest of stack      */
  2849.         BytT   mflg;                   /* current control-flags */
  2850.         BytT   mbtn;                   /* last button-status    */
  2851.         IntT   mcnt;                   /* last button-count     */
  2852.         IntT   mhor;                   /* last horiz. motion    */
  2853.         IntT   mver;                   /* last vert. motion     */
  2854.         KeyT   mlkc;                   /* left-button keycode   */
  2855.         KeyT   mrkc;                   /* right-button keycode  */
  2856.         KeyT   mmkc;                   /* middle-button keycode */
  2857.         WrdT   mfut;                   /* reserved for future   */
  2858.   };
  2859.  
  2860.   TYP struct Mou MouT, *MouP;
  2861.  
  2862.  
  2863. ---------------------------------------------------------------------------
  2864.  
  2865.  
  2866.  
  2867.  
  2868.  
  2869.  
  2870.  
  2871.  
  2872.  
  2873.  
  2874.  
  2875.  
  2876.  
  2877.  
  2878.  
  2879.  
  2880.  
  2881.  
  2882.  
  2883.  
  2884.  
  2885.  
  2886.  
  2887. TesSeRact CXL V5.5 User's Guide                                     Page 45
  2888.  
  2889.                          Format Control Subsystem
  2890.  
  2891.  
  2892. ---------------------------------------------------------------------------
  2893.  
  2894. NAME.........Fmt
  2895.  
  2896. DESCRIPTION
  2897.      This is  the global  structure controlling input format control for
  2898.      the TCXL system.
  2899.  
  2900. DECLARATION
  2901.   struct Fmt                           /* Format-control object */
  2902.   {     ChrP   ftgl;                   /* option toggle string  */
  2903.         ChrP   fchr;                   /* control char string   */
  2904.         VfiCP  fput;                   /* backspace function    */
  2905.         BytT   flen;                   /* input field length    */
  2906.         BytT   fdec;                   /* decimal position      */
  2907.         BytT   fopt;                   /* option state          */
  2908.         BytT   fuse;                   /* usage state           */
  2909.         ChrT   fpfx;                   /* currency-prefix char  */
  2910.         ChrT   fsep;                   /* currency seperator    */
  2911.         ChrT   fsfx;                   /* currency-suffix char  */
  2912.         BytT   ffut[3];                /* reserved for future   */
  2913.   };
  2914.   TYP struct Fmt FmtT;
  2915.  
  2916. ---------------------------------------------------------------------------
  2917.  
  2918.  
  2919.                        Control Structures and Macros
  2920.  
  2921. These global control structures are described here for information purposes
  2922. only.   Directly modifying  members  of  these  structures  could  be  very
  2923. dangerous for  application programs,  as they  are internally maintained by
  2924. the TCXL library functions.
  2925.  
  2926. If you  find the need within your application to read the values associated
  2927. with the  structures described here and in the previous chapter, please use
  2928. the described  macros;   in future releases, these macros will be retained,
  2929. even if the structure definitions change.
  2930.  
  2931. ---------------------------------------------------------------------------
  2932.  
  2933.  
  2934.  
  2935.  
  2936.  
  2937.  
  2938.  
  2939.  
  2940.  
  2941.  
  2942.  
  2943.  
  2944.  
  2945.  
  2946. Page 46                                     TesSeRact CXL V5.5 User's Guide
  2947.                                 Menu System
  2948.  
  2949.  
  2950. ---------------------------------------------------------------------------
  2951.  
  2952. NAME........._MnuCtl
  2953.  
  2954. DESCRIPTION
  2955.      This global  variable is  used to maintain the menu system built by
  2956.      TCXL functions.
  2957.  
  2958. DECLARATION
  2959.   GBL MctlT CDC _MnuCtl
  2960.  
  2961. EQUATES
  2962.                   /* Menu Feature Masks */
  2963.   #define ITM_PUL     0x01       /* has pull-down menu attached */
  2964.   #define ITM_NSL     0x02       /* not selectable              */
  2965.   #define ITM_AFT     0x04       /* close after select func     */
  2966.   #define ITM_ALL     0x08       /* close all when selected     */
  2967.   #define ITM_BEF     0x10       /* close before select func    */
  2968.   #define ITM_DSP     0x20       /* redisplay                   */
  2969.  
  2970.                   /* Menu Types */
  2971.   #define MNU_HOR     0x01           /* horizontal menu         */
  2972.   #define MNU_VER     0x02           /* vertical menu           */
  2973.   #define MNU_OMN     0x07           /* omnidirectional menu    */
  2974.   #define MNU_PUL     0x08           /* pull-down menu          */
  2975.   #define MNU_NQS     0x10           /* disable quick selection */
  2976.   #define MNU_SAV     0x20           /* save last bar position  */
  2977.   #define MNU_DSP     0x40           /* always display          */
  2978.   #define MNU_USE     0x80           /* use current window       /
  2979.  
  2980. ACCESS MACROS
  2981.   #define MctlTop (_MnuCtl.mtop)                /* top menu     */
  2982.   #define MctlCur (_MnuCtl.mcur)                /* current menu */
  2983.   #define MctlMnu (_MnuCtl.mmnu)                /* menu level   */
  2984.   #define MctlItm (_MnuCtl.mitm)                /* item level   */
  2985.  
  2986. OTHER RELATED MACROS
  2987.   #define MdfPrv(m)   ((m)->mprv)          /* previous MdfT     */
  2988.   #define MdfNxt(m)   ((m)->mnxt)          /* next MdfT         */
  2989.   #define MdfPar(m)   ((m)->mpar)          /* parent MdfT       */
  2990.   #define MdfTop(m)   ((m)->mtop)          /* head IdfT         */
  2991.   #define MdfCur(m)   ((m)->mcur)          /* current IdfT      */
  2992.   #define MdfOpn(m)   ((m)->mopn)          /* post-open func    */
  2993.   #define MdfTag(m)   ((m)->mtag)          /* selected tag ID   */
  2994.   #define MdfBeg(m)   ((m)->mbeg)          /* start position    */
  2995.   #define MdfBegW(m)  (VposW(MdfBeg(m)))   /*    word           */
  2996.   #define MdfBegC(m)  (VposC(MdfBeg(m)))   /*    col            */
  2997.   #define MdfBegR(m)  (VposR(MdfBeg(m)))   /*    row            */
  2998.   #define MdfEnd(m)   ((m)->mend)          /* end position      */
  2999.   #define MdfEndW(m)  (VposW(MdfEnd(m)))   /*    word           */
  3000.   #define MdfEndC(m)  (VposC(MdfEnd(m)))   /*    col            */
  3001.   #define MdfEndR(m)  (VposR(MdfEnd(m)))   /*    row            */
  3002.   #define MdfFrm(m)   ((m)->mfrm)          /* border            */
  3003.   #define MdfFrmT(m)  (BoxTyp(MdfFrm(m)))  /*    type           */
  3004.  
  3005. TesSeRact CXL V5.5 User's Guide                                     Page 47
  3006.   #define MdfFrmA(m)  (BoxAtr(MdfFrm(m)))  /*    attr           */
  3007.   #define MdfWat(m)   ((m)->mwat)          /* window attr       */
  3008.   #define MdfTyp(m)   ((m)->mtyp)          /* type mask         */
  3009.   #define MdfHor(m)   (0 != (MdfTyp(m) & MNU_HOR)) /*horizontal */
  3010.   #define MdfVer(m)   (0 != (MdfTyp(m) & MNU_VER)) /*vertical   */
  3011.   #define MdfOmn(m)   (0 != (MdfTyp(m) & MNU_OMN)) /*omnidirect */
  3012.   #define MdfPul(m)   (0 != (MdfTyp(m) & MNU_PUL)) /*pull-down  */
  3013.   #define MdfNqs(m)   (0 != (MdfTyp(m) & MNU_NQS)) /*no quicksel*/
  3014.   #define MdfSav(m)   (0 != (MdfTyp(m) & MNU_SAV)) /*save barpos*/
  3015.   #define MdfDsp(m)   (0 != (MdfTyp(m) & MNU_DSP)) /*always disp*/
  3016.   #define MdfUse(m)   (0 != (MdfTyp(m) & MNU_USE)) /*use current*/
  3017.   #define MdfWid(m)   ((m)->mwid)          /* bar width         */
  3018.   #define MdfOfs(m)   ((m)->mofs)          /* text offset       */
  3019.   #define MdfTat(m)   ((m)->mtat)          /* text attribute    */
  3020.   #define MdfSat(m)   ((m)->msat)          /* select char attr  */
  3021.   #define MdfNat(m)   ((m)->mnat)          /* non-select attr   */
  3022.   #define MdfBat(m)   ((m)->mbat)          /* bar attribute     */
  3023.  
  3024.   #define IdfPrv(i)   ((i)->iprv)          /* previous IdfT     */
  3025.   #define IdfNxt(i)   ((i)->inxt)          /* next IdfT         */
  3026.   #define IdfSub(i)   ((i)->isub)          /* submenu MdfT      */
  3027.   #define IdfStr(i)   ((i)->istr)          /* selection text    */
  3028.   #define IdfTxt(i)   ((i)->itxt)          /* description text  */
  3029.   #define IdfSel(i)   ((i)->isel)          /* "select" function */
  3030.   #define IdfBef(i)   ((i)->ibef)          /* "before" function */
  3031.   #define IdfAft(i)   ((i)->iaft)          /* "after"  function */
  3032.   #define IdfKey(i)   ((i)->ikey)          /* hot key           */
  3033.   #define IdfTag(i)   ((i)->itag)          /* tag ID            */
  3034.   #define IdfHlp(i)   ((i)->ihlp)          /* help tag          */
  3035.   #define IdfSpo(i)   ((i)->ispo)          /* text pos          */
  3036.   #define IdfSpoW(i)  (VposW(IdfSpo(i)))   /*    word           */
  3037.   #define IdfSpoC(i)  (VposC(IdfSpo(i)))   /*    col            */
  3038.   #define IdfSpoR(i)  (VposR(IdfSpo(i)))   /*    row            */
  3039.   #define IdfDpo(i)   ((i)->idpo)          /* description pos   */
  3040.   #define IdfDpoW(i)  (VposW(IdfDpo(i)))   /*    word           */
  3041.   #define IdfDpoC(i)  (VposC(IdfDpo(i)))   /*    col            */
  3042.   #define IdfDpoR(i)  (VposR(IdfDpo(i)))   /*    row            */
  3043.   #define IdfDat(i)   ((i)->idat)          /* description attr  */
  3044.   #define IdfChr(i)   ((i)->ichr)          /* quick select char */
  3045.   #define IdfMsk(i)   ((i)->imsk)          /* feature mask      */
  3046.   #define IdfPul(i)   (0 != (IdfMsk(i) & ITM_PUL)) /*pull-down  */
  3047.   #define IdfNsl(i)   (0 != (IdfMsk(i) & ITM_NSL)) /*not select */
  3048.   #define IdfCaf(i)   (0 != (IdfMsk(i) & ITM_AFT)) /*close after*/
  3049.   #define IdfCal(i)   (0 != (IdfMsk(i) & ITM_ALL)) /*close all  */
  3050.   #define IdfCbf(i)   (0 != (IdfMsk(i) & ITM_BEF)) /*close befor*/
  3051.   #define IdfDsp(i)   (0 != (IdfMsk(i) & ITM_DSP)) /*redisplay  */
  3052.   #define IdfLen(i)   ((i)->ilen)          /* text length       */
  3053.   #define IdfCpo(i)   ((i)->icpo)          /* center position   */
  3054.   #define IdfCpoW(i)  (VposW(IdfCpo(i)))   /*    word           */
  3055.   #define IdfCpoC(i)  (VposC(IdfCpo(i)))   /*    col            */
  3056.   #define IdfCpoR(i)  (VposR(IdfCpo(i)))   /*    row            */
  3057.  
  3058.  
  3059.  
  3060.  
  3061.  
  3062.  
  3063.  
  3064. Page 48                                     TesSeRact CXL V5.5 User's Guide
  3065. ---------------------------------------------------------------------------
  3066.  
  3067.                                Entry System
  3068.  
  3069.  
  3070. ---------------------------------------------------------------------------
  3071.  
  3072. NAME........._EntCtl
  3073.  
  3074. DESCRIPTION
  3075.      This global  variable is  used to  maintain the  Entry  System  for
  3076.      filling in forms built by TCXL functions.
  3077.  
  3078. DECLARATION
  3079.   GBL EdfP CDC _EntCtl;
  3080.  
  3081. EQUATES
  3082.                   /* Field Feature Bits */
  3083.   #define FLD_NUL 0x0000       /* no special features defined   */
  3084.   #define FLD_LWR 0x0001       /* convert chars to lowercase    */
  3085.   #define FLD_UPR 0x0002       /* convert chars to uppercase    */
  3086.   #define FLD_MIX 0x0004       /* convert chars to mixed case   */
  3087.   #define FLD_PAS 0x0008       /* do not echo typed-in chars    */
  3088.   #define FLD_NUM 0x0010       /* treat field as numeric        */
  3089.   #define FLD_CUR 0x0020       /* currency field                */
  3090.   #define FLD_NWR 0x0040       /* no auto-wrap to next field    */
  3091.   #define FLD_LJS 0x0080       /* left justify                  */
  3092.   #define FLD_RJS 0x0100       /* right justify                 */
  3093.   #define FLD_TRM 0x0200       /* trim end spaces               */
  3094.  
  3095.                   /* Field Movement */
  3096.   #define FDF_MOV 0x0F         /* movement                      */
  3097.   #define FDF_BEG 0x01         /* to first field                */
  3098.   #define FDF_END 0x02         /* to last field                 */
  3099.   #define FDF_UP  0x04         /* to previous field             */
  3100.   #define FDF_DWN 0x08         /* to next field                 */
  3101.  
  3102.                   /* EntFld() field edit-modes */
  3103.   #define FLD_INI 0x00         /* initial mode                  */
  3104.   #define FLD_CHG 0x01         /* change mode                   */
  3105.   #define FLD_CND 0x02         /* conditional-update mode       */
  3106.                   /* Field Control */
  3107.   #define FDF_MOD 0x70         /* update mode                   */
  3108.   #define FDF_INI 0x10         /*    initial                    */
  3109.   #define FDF_CHG 0x20         /*    change                     */
  3110.   #define FDF_CND 0x40         /*    conditional                */
  3111.   #define FDF_DSP 0x80         /* re-display                    */
  3112.  
  3113.                   /* Entry Control */
  3114.   #define EDF_NUM 0x01         /* decimal format field          */
  3115.   #define EDF_CUR 0x02         /* currency field formatting     */
  3116.   #define EDF_INS 0x04         /* insert mode                   */
  3117.   #define EDF_HIL 0x08         /* highlight field               */
  3118.   #define EDF_KEY 0x80         /* field hot-keys assigned       */
  3119.  
  3120.  
  3121.  
  3122.  
  3123. TesSeRact CXL V5.5 User's Guide                                     Page 49
  3124. ACCESS MACROS
  3125.                                      /* entry form object       */
  3126.   #define EdfTop(e)   ((e)->etop)         /* head FdfT          */
  3127.   #define EdfFld(e)   ((e)->efld)         /* current FdfT       */
  3128.   #define EdfGet(e)   ((e)->eget)         /* get function       */
  3129.   #define EdfTrm(e)   ((e)->etrm)         /* terminating key    */
  3130.   #define EdfFmt(e)   ((e)->efmt)         /* format string      */
  3131.   #define EdfBfr(e)   ((e)->ebfr)         /* buffer string      */
  3132.   #define EdfBas(e)   ((e)->ebas)         /* buffer base        */
  3133.   #define EdfSep(e)   ((e)->esep)         /* word separators    */
  3134.   #define EdfPos(e)   ((e)->epos)         /* window position    */
  3135.   #define EdfPosW(e)  (VposW(EdfPos(e)))  /*  word              */
  3136.   #define EdfPosC(e)  (VposC(EdfPos(e)))  /*  col               */
  3137.   #define EdfPosR(e)  (VposR(EdfPos(e)))  /*  row               */
  3138.   #define EdfLen(e)   ((e)->elen)         /* field-length       */
  3139.   #define EdfDec(e)   ((e)->edec)         /* decimal-position   */
  3140.   #define EdfCtl(e)   ((e)->ectl)         /* Field Control      */
  3141.   #define EdfFat(e)   ((e)->efat)         /* field attribute    */
  3142.   #define EdfTat(e)   ((e)->etat)         /* text attribute     */
  3143.  
  3144. OTHER RELATED MACROS
  3145.  
  3146.                                       /* entry field object     */
  3147.   #define FdfPrv(f)   ((f)->fprv)         /* previous FdfT      */
  3148.   #define FdfNxt(f)   ((f)->fnxt)         /* next FdfT          */
  3149.   #define FdfStr(f)   ((f)->fstr)         /* receiving string   */
  3150.   #define FdfBfr(f)   ((f)->fbfr)         /* temp string        */
  3151.   #define FdfFmt(f)   ((f)->ffmt)         /* format string      */
  3152.   #define FdfVal(f)   ((f)->fval)         /* "valid" function   */
  3153.   #define FdfBef(f)   ((f)->fbef)         /* "before" function  */
  3154.   #define FdfAft(f)   ((f)->faft)         /* "after"  function  */
  3155.   #define FdfKey(f)   ((f)->fkey)         /* hotkey             */
  3156.   #define FdfMsk(f)   ((f)->fmsk)         /* feature mask       */
  3157.   #define FdfTag(f)   ((f)->ftag)         /* tag ID             */
  3158.   #define FdfHlp(f)   ((f)->fhlp)         /* help category      */
  3159.   #define FdfPos(f)   ((f)->fpos)         /* position           */
  3160.   #define FdfPosW(f)  (VposW(FdfPos(f)))  /*  word              */
  3161.   #define FdfPosC(f)  (VposC(FdfPos(f)))  /*  col               */
  3162.   #define FdfPosR(f)  (VposR(FdfPos(f)))  /*  row               */
  3163.   #define FdfCtl(f)   ((f)->fctl)         /* control flags      */
  3164.   #define FdfMov(f)   (0 != (FdfCtl(f) & FDF_MOV)) /* movement  */
  3165.   #define FdfBeg(f)   (0 != (FdfCtl(f) & FDF_BEG)) /* to first  */
  3166.   #define FdfEnd(f)   (0 != (FdfCtl(f) & FDF_END)) /* to last   */
  3167.   #define FdfUp(f)    (0 != (FdfCtl(f) & FDF_UP))  /*to previous*/
  3168.   #define FdfDwn(f)   (0 != (FdfCtl(f) & FDF_DWN)) /* to next   */
  3169.   #define FdfLen(f)   ((f)->flen)         /* buffer length      */
  3170.   #define FdfDec(f)   ((f)->fdec)         /* decimal position   */
  3171.  
  3172.  
  3173.  
  3174.  
  3175.  
  3176.  
  3177.  
  3178.  
  3179.  
  3180.  
  3181.  
  3182. Page 50                                     TesSeRact CXL V5.5 User's Guide
  3183. ---------------------------------------------------------------------------
  3184.  
  3185.                              Selection System
  3186.  
  3187.  
  3188. ---------------------------------------------------------------------------
  3189.  
  3190. NAME.........SelPtr
  3191. .............SelNdx
  3192.  
  3193. DESCRIPTION
  3194.      Although the  structures and  variables in the Selection System are
  3195.      internal only,  these two  global variables  are provided  to allow
  3196.      users  access  to  the  currently-highlighted  item.    This  would
  3197.      normally be  used in  a function bound to a special key that needed
  3198.      to know what item is currently selected.
  3199.  
  3200. DECLARATION
  3201.   GBL ChrP CDC SelPtr;            /* Current Selected-Item Text  */
  3202.   GBL IntT CDC SelNdx;            /* Current Selected-Item Index */
  3203.  
  3204. ---------------------------------------------------------------------------
  3205.  
  3206.                                 Help System
  3207.  
  3208.  
  3209. ---------------------------------------------------------------------------
  3210.  
  3211. NAME........._HlpCtl
  3212.  
  3213. DESCRIPTION
  3214.      This is the global help control variable.  All help functions, both
  3215.      automatic and  user-callable, access this control structure for the
  3216.      help system.
  3217.  
  3218. DECLARATION
  3219.  
  3220.   GBL HctlP CDC _HlpCtl;
  3221.  
  3222.  
  3223. EQUATES
  3224.   #define HLP_STK 20                        /* help-stack depth */
  3225.  
  3226.  
  3227.  
  3228.  
  3229.  
  3230.  
  3231.  
  3232.  
  3233.  
  3234.  
  3235.  
  3236.  
  3237.  
  3238.  
  3239.  
  3240.  
  3241. TesSeRact CXL V5.5 User's Guide                                     Page 51
  3242. ACCESS MACROS
  3243.   #define HctlStk(h,i) ((h)->hstk[i])      /* stack-element[i]  */
  3244.   #define HctlFil(h)  ((h)->hfil)          /* filename          */
  3245.   #define HctlOpn(h)  ((h)->hopn)          /* open-function     */
  3246.   #define HctlPtr(h)  ((h)->hptr)          /* stack-pointer     */
  3247.   #define HctlKey(h)  ((h)->hkey)          /* hot-key           */
  3248.   #define HctlWat(h)  ((h)->hwat)          /* window attr       */
  3249.   #define HctlTat(h)  ((h)->htat)          /* text attr         */
  3250.   #define HctlSat(h)  ((h)->hsat)          /* select attr       */
  3251.   #define HctlBat(h)  ((h)->hbat)          /* bar attr          */
  3252.   #define HctlBeg(h)  ((h)->hbeg)          /* start pos         */
  3253.   #define HctlBegW(h) (VposWrd((h)->hbeg)) /*    word           */
  3254.   #define HctlBegR(h) (VposRow((h)->hbeg)) /*    row            */
  3255.   #define HctlBegC(h) (VposCol((h)->hbeg)) /*    col            */
  3256.   #define HctlEnd(h)  ((h)->hend)          /* end pos           */
  3257.   #define HctlEndW(h) (VposWrd((h)->hend)) /*    word           */
  3258.   #define HctlEndR(h) (VposRow((h)->hend)) /*    row            */
  3259.   #define HctlEndC(h) (VposCol((h)->hend)) /*    col            */
  3260.   #define HctlBox(h)  ((h)->hbox)          /* frame type        */
  3261.   #define HctlFlg(h)  ((h)->hflg)          /* flag bits         */
  3262.   #define HctlTtl(h)  (0 != ((h)->hflg & 0x01)) /*display title?*/
  3263.  
  3264.  
  3265. ---------------------------------------------------------------------------
  3266.  
  3267.                                Window System
  3268.  
  3269. ---------------------------------------------------------------------------
  3270.  
  3271. NAME........._WinCtl
  3272.  
  3273. DESCRIPTION
  3274.      This structure  is used  to hold all global window information, and
  3275.      directly ties  the windows  to the  video subsystem.    Macros  are
  3276.      declared in  TCXLwin.H that  are used to access the various members
  3277.      of this structure.
  3278.  
  3279. DECLARATION
  3280.  
  3281.   GBL   WctlT  CDC _WinCtl;               /* global window info */
  3282.  
  3283.  
  3284. EQUATES
  3285.                     /* Border Sides */
  3286.   #define   BRD_TOP 0x00                         /* Top Side    */
  3287.   #define   BRD_BOT 0x01                         /* Bottom Side */
  3288.   #define   BRD_LFT 0x02                         /* Left Side   */
  3289.   #define   BRD_RGT 0x03                         /* Right Side  */
  3290.  
  3291.                     /* Border Types */
  3292.   #define   BOX_SNG 0x00          /* all single                 */
  3293.   #define   BOX_DBL 0x01          /* all double                 */
  3294.   #define   BOX_VER 0x02          /* horiz single, vert double  */
  3295.   #define   BOX_HOR 0x03          /* horiz double, vert single  */
  3296.   #define   BOX_HVY 0x04          /* heavy lines                */
  3297.   #define   BOX_SPA 0x05          /* spaces                     */
  3298.  
  3299.  
  3300. Page 52                                     TesSeRact CXL V5.5 User's Guide
  3301.                     /* Centering Flags */
  3302.   #define   CNT_HOR 0x01                   /* Center Horizontal */
  3303.   #define   CNT_VER 0x02                   /* Center Vertical   */
  3304.   #define   CNT_CNT 0x03                   /* Center Both       */
  3305.  
  3306.                     /* Direction Codes */
  3307.   #define   DIR_DWN 0x00                               /* Down  */
  3308.   #define   DIR_UP  0x01                               /* Up    */
  3309.   #define   DIR_LFT 0x02                               /* Left  */
  3310.   #define   DIR_RGT 0x03                               /* Right */
  3311.  
  3312.                     /* Title Positions */
  3313.   #define   TTL_LFT 0x01                     /* left justified  */
  3314.   #define   TTL_CNT 0x02                     /* centered        */
  3315.   #define   TTL_RGT 0x03                     /* right justified */
  3316.  
  3317.  
  3318. ACCESS MACROS
  3319.   #define WctlAct     (_WinCtl.wact)       /* active window     */
  3320.   #define WctlHid     (_WinCtl.whid)       /* top hidden window */
  3321.   #define WctlFun     (_WinCtl.wfun)       /* fill function     */
  3322.   #define WctlHdl     (_WinCtl.whdl)       /* last handle       */
  3323.   #define WctlHlp     (_WinCtl.whlp)       /* help category     */
  3324.   #define WctlOpn     (_WinCtl.wopn)       /* total open        */
  3325.   #define WctlEsc     (_WinCtl.wesc)       /* [Esc] check       */
  3326.   #define WctlTab     (_WinCtl.wtab)       /* tab width         */
  3327.   #define WctlFil     (_WinCtl.wfil)       /* fill char         */
  3328.   #define WctlFlg     (_WinCtl.wflg)       /* flag byte         */
  3329.  
  3330. OTHER RELATED MACROS
  3331.   #define BoxTyp(b)   ((b).btyp)         /* Type of Border      */
  3332.   #define BoxAtr(b)   ((b).batr)         /* Attribute of Border */
  3333.  
  3334.   #define TtlStr(t)   ((t).tstr)         /* Title String        */
  3335.   #define TtlPos(t)   ((t).tpos)         /* Title Position      */
  3336.   #define TtlAtr(t)   ((t).tatr)         /* Title Attribute     */
  3337.  
  3338.   #define WdfPrv(w)   ((w)->wprv)          /* previous WdfT     */
  3339.   #define WdfNxt(w)   ((w)->wnxt)          /* next WdfT         */
  3340.   #define WdfBfr(w)   ((w)->wbfr)          /* buffer            */
  3341.   #define WdfSbf(w)   ((w)->wsbf)          /* shadow buffer     */
  3342.   #define WdfTtl(w)   ((w)->wttl)          /* title             */
  3343.   #define WdfTtlS(w)  (TtlStr(WdfTtl(w)))  /*    string         */
  3344.   #define WdfTtlP(w)  (TtlPos(WdfTtl(w)))  /*    position       */
  3345.   #define WdfTtlA(w)  (TtlAtr(WdfTtl(w)))  /*    attribute      */
  3346.   #define WdfHdl(w)   ((w)->whdl)          /* handle            */
  3347.   #define WdfHlp(w)   ((w)->whlp)          /* help category     */
  3348.   #define WdfBeg(w)   ((w)->wbeg)          /* start position    */
  3349.   #define WdfBegW(w)  (VposW(WdfBeg(w)))   /*    word           */
  3350.   #define WdfBegC(w)  (VposC(WdfBeg(w)))   /*    col            */
  3351.   #define WdfBegR(w)  (VposR(WdfBeg(w)))   /*    row            */
  3352.   #define WdfEnd(w)   ((w)->wend)          /* end position      */
  3353.   #define WdfEndW(w)  (VposW(WdfEnd(w)))   /*    word           */
  3354.   #define WdfEndC(w)  (VposC(WdfEnd(w)))   /*    col            */
  3355.   #define WdfEndR(w)  (VposR(WdfEnd(w)))   /*    row            */
  3356.   #define WdfPos(w)   ((w)->wpos)          /* cursor position   */
  3357.   #define WdfPosW(w)  (VposW(WdfPos(w)))   /*    word           */
  3358.  
  3359. TesSeRact CXL V5.5 User's Guide                                     Page 53
  3360.   #define WdfPosC(w)  (VposC(WdfPos(w)))   /*    col            */
  3361.   #define WdfPosR(w)  (VposR(WdfPos(w)))   /*    row            */
  3362.   #define WdfFrm(w)   ((w)->wfrm)          /* border            */
  3363.   #define WdfFrmT(w)  (BoxTyp(WdfFrm(w)))  /*    type           */
  3364.   #define WdfFrmA(w)  (BoxAtr(WdfFrm(w)))  /*    attribute      */
  3365.   #define WdfDat(w)   ((w)->wdat)          /* default attribute */
  3366.   #define WdfCat(w)   ((w)->wcat)          /* current attribute */
  3367.   #define WdfSat(w)   ((w)->wsat)          /* shadow attribute  */
  3368.   #define WdfBrd(w)   ((w)->wbrd)          /* border            */
  3369.  
  3370.  
  3371. ---------------------------------------------------------------------------
  3372.  
  3373.  
  3374.  
  3375.                            Information Subsystem
  3376.  
  3377.  
  3378. ---------------------------------------------------------------------------
  3379.  
  3380. NAME........._HdwCtl
  3381.  
  3382. DESCRIPTION
  3383.      This is  the  declaration  of  the  global  hardware  confiduration
  3384.      information, based on the Hdw structure (Page 38).
  3385.  
  3386. DECLARATION
  3387.  
  3388.   GBL HdwT CDC _HdwCtl;           /* Global Hardware-data object */
  3389.  
  3390.  
  3391. EQUATES
  3392.                     /* Machine ID's returned by Machid() */
  3393.   #define  IBMPC    0xFF     /* IBM PC                          */
  3394.   #define  IBMPCXT  0xFE     /* IBM PC/XT, Portable, old DeskPro*/
  3395.   #define  IBMPCJR  0xFD     /* IBM PCjr                        */
  3396.   #define  IBMPCAT  0xFC     /* IBM PC/AT, XT/286, PS/2 50,60   */
  3397.   #define  IBMPCXT2 0xFB     /* IBM PC/XT                       */
  3398.   #define  IBMPS30  0xFA     /* IBM PS/2 model 30               */
  3399.   #define  IBMCONV  0xF9     /* IBM PC Convertible              */
  3400.   #define  IBMPS80  0xF8     /* IBM PS/2 model 80               */
  3401.   #define  SPERRYPC 0x30     /* Sperry PC                       */
  3402.   #define  CPQPORT  0x2D     /* old Compaq portable             */
  3403.   #define  CPQPLUS  0x9A     /* old Compaq plus                 */
  3404.   #define  HP110    0xB6     /* HP-110 portable                 */
  3405.  
  3406.                     /* Hardware option flag bits */
  3407.   #define  HDW_GAM  0x01                    /* game-adapter     */
  3408.   #define  HDW_NDP  0x02                    /* math-coprocessor */
  3409.   #define  HDW_MOU  0x04                    /* PS/2 mouse       */
  3410.   #define  HDW_MDM  0x08                    /* PS/2 modem       */
  3411.   #define  HDW_C40  0x10                    /* 40-col color     */
  3412.   #define  HDW_C80  0x20                    /* 80-col color     */
  3413.   #define  HDW_M80  0x40                    /* 80-col mono      */
  3414.  
  3415.  
  3416.  
  3417.  
  3418. Page 54                                     TesSeRact CXL V5.5 User's Guide
  3419. ACCESS MACROS
  3420.   #define HdwPar  (_HdwCtl.hpar)              /* parallel ports */
  3421.   #define HdwSer  (_HdwCtl.hser)              /* serial ports   */
  3422.   #define HdwDrv  (_HdwCtl.hdrv)              /* floppy-drives  */
  3423.   #define HdwFlg  (_HdwCtl.hflg)              /* option-flags   */
  3424.   #define HdwGam  (0 != (HdwFlg & HDW_GAM))  /* game-adapter    */
  3425.   #define HdwNdp  (0 != (HdwFlg & HDW_NDP))  /* math-coprocessor*/
  3426.   #define HdwMou  (0 != (HdwFlg & HDW_MOU))  /* PS/2 mouse      */
  3427.   #define HdwMdm  (0 != (HdwFlg & HDW_MDM))  /* PS/2 modem      */
  3428.   #define HdwC40  (0 != (HdwFlg & HDW_C40))  /* 40-col color    */
  3429.   #define HdwC80  (0 != (HdwFlg & HDW_C80))  /* 80-col color    */
  3430.   #define HdwM80  (0 != (HdwFlg & HDW_M80))  /* 80-col mono     */
  3431.  
  3432.   #define gameport()  HdwGam          /* obsolete CXL functions */
  3433.   #define mathchip()  HdwNdp
  3434.   #define numflop()   HdwDrv
  3435.   #define numpar()    HdwPar
  3436.   #define numser()    HdwSer
  3437.  
  3438.  
  3439. ---------------------------------------------------------------------------
  3440.  
  3441. NAME........._TcxlCtl
  3442.  
  3443. DESCRIPTION
  3444.      This is  the TesSeRact CXL Control Object.  It contains system-wide
  3445.      error, debugging and operating information.
  3446.  
  3447. DECLARATION
  3448.   GBL TcxlT CDC _TcxlCtl;
  3449.  
  3450. EQUATES
  3451.                     /* TcxlSys values */
  3452.   #define   SYS_DOS 0x0000              /* MS-DOS/PC-DOS/DR_DOS */
  3453.   #define   SYS_JDS 0x0001              /* Japan DOS            */
  3454.   #define   SYS_OS2 0x0002              /* OS/2                 */
  3455.   #define   SYS_XNX 0x0003              /* MS/SCO Xenix         */
  3456.   #define   SYS_UNX 0x0004              /* AT&T Unix            */
  3457.   #define   SYS_BSD 0x0005              /* BSD Unix             */
  3458.   #define   SYS_AIX 0x0006              /* IBM AIX              */
  3459.   #define   SYS_VMS 0x0007              /* DEC VMS              */
  3460.                     /* TcxlEnv bits (DOS) */
  3461.   #define   ENV_MOU 0x0001              /* Mouse                */
  3462.   #define   ENV_KEY 0x0002              /* Enhanced Keyboard    */
  3463.   #define   ENV_UV  0x0004              /* Ultravision          */
  3464.   #define   ENV_ESA 0x0010              /* EISA bus             */
  3465.   #define   ENV_MCA 0x0020              /* MCA bus              */
  3466.  
  3467.  
  3468.  
  3469.  
  3470.  
  3471.  
  3472.  
  3473.  
  3474.  
  3475.  
  3476.  
  3477. TesSeRact CXL V5.5 User's Guide                                     Page 55
  3478. ACCESS MACROS
  3479.   #define   TcxlErr (_TcxlCtl.terr)             /* error code   */
  3480.   #define   TcxlDbg (_TcxlCtl.tdbg)             /* debug-level  */
  3481.   #define   TcxlSys (_TcxlCtl.tsys)             /* system       */
  3482.   #define   TcxlDos (TcxlSys == SYS_DOS)        /*    DOS       */
  3483.   #define   TcxlJds (TcxlSys == SYS_JDS)        /*    Japan DOS */
  3484.   #define   TcxlOs2 (TcxlSys == SYS_OS2)        /*    OS/2      */
  3485.   #define   TcxlXnx (TcxlSys == SYS_XNX)        /*    Xenix     */
  3486.   #define   TcxlUnx (TcxlSys == SYS_UNX)        /*    AT&T Unix */
  3487.   #define   TcxlBsd (TcxlSys == SYS_BSD)        /*    BSD Unix  */
  3488.   #define   TcxlAix (TcxlSys == SYS_AIX)        /*    IBM AIX   */
  3489.   #define   TcxlVms (TcxlSys == SYS_VMS)        /*    DEC VMS   */
  3490.   #define   TcxlEnv (_TcxlCtl.tenv)             /* environment  */
  3491.   #define   TcxlMou (0 != (TcxlEnv & ENV_MOU))  /*  rodent      */
  3492.   #define   TcxlKey (0 != (TcxlEnv & ENV_KEY))  /*  101-key     */
  3493.   #define   TcxlUv  (0 != (TcxlEnv & ENV_UV))   /*  Ultravision */
  3494.   #define   TcxlEsa (0 != (TcxlEnv & ENV_ESA))  /*  EISA bus    */
  3495.   #define   TcxlMca (0 != (TcxlEnv & ENV_MCA))  /*  MCA bus     */
  3496.   #define   TcxlCfg (_TcxlCtl.tcfg)             /* configuration*/
  3497.  
  3498.  
  3499. ---------------------------------------------------------------------------
  3500.  
  3501.                              Memory Subsystem
  3502.  
  3503.  
  3504. ---------------------------------------------------------------------------
  3505.  
  3506. NAME........._MemCtl
  3507.  
  3508. DESCRIPTION
  3509.      This is  the declaration  of the  global memory  control structure.
  3510.      All EMS and XMS support is passed through this structure.
  3511.  
  3512. DECLARATION
  3513.   GBL _MemT CDC _MemCtl;
  3514.  
  3515. EQUATES
  3516.                                             /* Memory-flag bits */
  3517.   #define   MEM_DPMI        0x01              /* DPMI installed */
  3518.   #define   MEM_VCPI        0x02              /* VCPI installed */
  3519.   #define   MEM_EMS         0x04              /* EMS installed  */
  3520.   #define   MEM_XMS         0x08              /* XMS installed  */
  3521.   #define   MEM_HMA         0x10              /* HMA installed  */
  3522.  
  3523.  
  3524.  
  3525.  
  3526.  
  3527.  
  3528.  
  3529.  
  3530.  
  3531.  
  3532.  
  3533.  
  3534.  
  3535.  
  3536. Page 56                                     TesSeRact CXL V5.5 User's Guide
  3537.   #define   EMS_BadSoft     0x80             /* EMS error-codes */
  3538.   #define   EMS_BadHdw      0x81
  3539.   #define   EMS_Busy        0x82
  3540.   #define   EMS_BadHandle   0x83
  3541.   #define   EMS_BadFun      0x84
  3542.   #define   EMS_NoHandles   0x85
  3543.   #define   EMS_MapErr      0x86
  3544.   #define   EMS_NotTotal    0x87
  3545.   #define   EMS_NotFree     0x88
  3546.   #define   EMS_NotZero     0x89
  3547.   #define   EMS_BadPage     0x8A
  3548.   #define   EMS_BadPhys     0x8B
  3549.   #define   EMS_SaveFull    0x8C
  3550.   #define   EMS_SaveDup     0x8D
  3551.   #define   EMS_NoSave      0x8E
  3552.   #define   EMS_BadSub      0x8F
  3553.  
  3554.   #define   XMS_BadFun      0x80             /* XMS error-codes */
  3555.   #define   XMS_Vdisk       0x81
  3556.   #define   XMS_A20Err      0x82
  3557.   #define   XMS_DrivErr     0x8E
  3558.   #define   XMS_Fatal       0x8F
  3559.   #define   XMS_NoHMA       0x90
  3560.   #define   XMS_HMABusy     0x91
  3561.   #define   XMS_HMASmall    0x92
  3562.   #define   XMS_HMAFree     0x93
  3563.   #define   XMS_NoXMS       0xA0
  3564.   #define   XMS_NoHandle    0xA1
  3565.   #define   XMS_BadHandle   0xA2
  3566.   #define   XMS_BadSrc      0xA3
  3567.   #define   XMS_BadSOff     0xA4
  3568.   #define   XMS_BadDst      0xA5
  3569.   #define   XMS_BadDOff     0xA6
  3570.   #define   XMS_BadLen      0xA7
  3571.   #define   XMS_BadOver     0xA8
  3572.   #define   XMS_Parity      0xA9
  3573.   #define   XMS_NotLock     0xAA
  3574.   #define   XMS_IsLock      0xAB
  3575.   #define   XMS_LockOvr     0xAC
  3576.   #define   XMS_LockFail    0xAD
  3577.   #define   XMS_SmallUMB    0xB0
  3578.   #define   XMS_NoUMB       0xB1
  3579.   #define   XMS_BadUMBSeg   0xB2
  3580.  
  3581.  
  3582.  
  3583.  
  3584.  
  3585.  
  3586.  
  3587.  
  3588.  
  3589.  
  3590.  
  3591.  
  3592.  
  3593.  
  3594.  
  3595. TesSeRact CXL V5.5 User's Guide                                     Page 57
  3596. ACCESS MACROS
  3597.   #define   MemMflg (_MemCtl.mMflg)     /* Memory Flags         */
  3598.   #define   MemDPMI (0 != (MemMflg & MEM_DPMI)) /*DPMI installed*/
  3599.   #define   MemVCPI (0 != (MemMflg & MEM_VCPI)) /*VCPI installed*/
  3600.   #define   MemEMS  (0 != (MemMflg & MEM_EMS)) /* EMS installed */
  3601.   #define   MemXMS  (0 != (MemMflg & MEM_XMS)) /* XMS installed */
  3602.   #define   MemHMA  (0 != (MemMflg & MEM_HMA)) /* HMA installed */
  3603.   #define   MemDpro (_MemCtl.mDpro)     /* DPMI Processor       */
  3604.   #define   MemD286 (0x02 == MemDpro)      /*    286            */
  3605.   #define   MemD386 (0x03 == MemDpro)      /*    386            */
  3606.   #define   MemD486 (0x04 == MemDpro)      /*    486            */
  3607.   #define   MemDflg (_MemCtl.mDflg)     /* DPMI Flags           */
  3608.   #define   MemDf32 (1 = MemDflg)       /*    32 Bit Support    */
  3609.   #define   MemDent (_MemCtl.mDent)     /* DPMI entry point     */
  3610.   #define   MemDver (_MemCtl.mDver)     /* DPMI version         */
  3611.   #define   MemVver (_MemCtl.mVver)     /* VCPI Version         */
  3612.   #define   MemEseg (_MemCtl.mEseg)     /* EMS Base Segment     */
  3613.   #define   MemEver (_MemCtl.mEver)     /* EMS Version          */
  3614.   #define   MemEfre (_MemCtl.mEfre)     /* EMS Free (16k page)  */
  3615.   #define   MemEtot (_MemCtl.mEtot)     /* EMS Total (16k page) */
  3616.   #define   MemEerr (_MemCtl.mEerr)     /* EMS Error Code       */
  3617.   #define   MemXerr (_MemCtl.mXerr)     /* XMS Error Code       */
  3618.   #define   MemXver (_MemCtl.mXver)     /* XMS Version          */
  3619.   #define   MemXent (_MemCtl.mXent)     /* XMS Entry Point      */
  3620.   #define   MemXint (_MemCtl.mXint)     /* XMS Internal Version */
  3621.   #define   MemHfre (_MemCtl.mHfre)     /* HMA free (para)      */
  3622.   #define   MemXtot (_MemCtl.mXtot)     /* XMS total free (1k)  */
  3623.   #define   MemXlrg (_MemCtl.mXlrg)     /* XMS largest free (1k)*/
  3624.   #define   MemUfre (_MemCtl.mUfre)     /* Largest free UMB     */
  3625.  
  3626.  
  3627. OTHER RELATED MACROS
  3628.   #define   XmsSlen(x)      ((x)->xSlen)  /* XMS Move Structure */
  3629.   #define   XmsShdl(x)      ((x)->xShdl)
  3630.   #define   XmsSptr(x)      ((x)->xSptr)
  3631.   #define   XmsTdhl(x)      ((x)->xTdhl)
  3632.   #define   XmsTptr(x)      ((x)->xTptr)
  3633.  
  3634. ---------------------------------------------------------------------------
  3635.  
  3636.  
  3637.  
  3638.  
  3639.  
  3640.  
  3641.  
  3642.  
  3643.  
  3644.  
  3645.  
  3646.  
  3647.  
  3648.  
  3649.  
  3650.  
  3651.  
  3652.  
  3653.  
  3654. Page 58                                     TesSeRact CXL V5.5 User's Guide
  3655.  
  3656.                              Printer Subsystem
  3657.  
  3658.  
  3659. ---------------------------------------------------------------------------
  3660.  
  3661. NAME.........Printer
  3662.  
  3663. There are  no global  variables  associated  with  the  Printer  Subsystem;
  3664. however, there are a series of equates for Epson-compatible printers.
  3665.  
  3666. EQUATES
  3667.   #define  L_BFOFF  "\033F"   /* turns bold faced printing off  */
  3668.   #define  L_BFON   "\033E"   /* turns bold faced printing on   */
  3669.   #define  L_DWOFF  "\033W0"  /* turns double wide printing off */
  3670.   #define  L_DWON   "\033W1"  /* turns double wide printing on  */
  3671.   #define  L_ELITE  "\033M"   /* sets printer in 12 CPI mode    */
  3672.   #define  L_INIT   "\033@"   /* initializes printer            */
  3673.   #define  L_ITALOFF "\0335"  /* turns italicized printing off  */
  3674.   #define  L_ITALON "\0334"   /* turns italicized printing on   */
  3675.   #define  L_PICA   "\033P"   /* sets printer in 10 CPI mode    */
  3676.   #define  L_ULOFF  "\033-0"  /* turns underlined printing off  */
  3677.   #define  L_ULON   "\033-1"  /* turns underlined printing on   */
  3678.  
  3679. ---------------------------------------------------------------------------
  3680.  
  3681.                               OpSys Subsystem
  3682.  
  3683.  
  3684. NAME.........OpSys
  3685.  
  3686. Please note  there are  no  global  variables  associated  with  the  OpSys
  3687. Subsystem.   However, we  do have  macros and  equates associated  with the
  3688. OpSys Subsystem structures.
  3689.  
  3690. EQUATES
  3691.   #define   FA_RDO  0x01                /* read only attribute  */
  3692.   #define   FA_HID  0x02                /* hidden               */
  3693.   #define   FA_SYS  0x04                /* system               */
  3694.   #define   FA_VOL  0x08                /* volume label         */
  3695.   #define   FA_DIR  0x10                /* directory            */
  3696.   #define   FA_ARC  0x20                /* archive              */
  3697.   #define   FA_DEV  0x40                /* device *UNDOC*       */
  3698.  
  3699.  
  3700.  
  3701.  
  3702.  
  3703.  
  3704.  
  3705.  
  3706.  
  3707.  
  3708.  
  3709.  
  3710.  
  3711.  
  3712.  
  3713. TesSeRact CXL V5.5 User's Guide                                     Page 59
  3714. ACCESS MACROS
  3715.   #define FfbDos(f)   ((f).fdos)              /* DOS-reserved   */
  3716.   #define FfbAtr(f)   ((f).fatr)              /* file attribute */
  3717.   #define FfbRdo(f)   (0 != ((f).fatr & FA_RDO))  /*  read-only */
  3718.   #define FfbHid(f)   (0 != ((f).fatr & FA_HID))  /*  hidden    */
  3719.   #define FfbSys(f)   (0 != ((f).fatr & FA_SYS))  /*  system    */
  3720.   #define FfbVol(f)   (0 != ((f).fatr & FA_VOL))  /*  volume    */
  3721.   #define FfbDir(f)   (0 != ((f).fatr & FA_DIR))  /*  directory */
  3722.   #define FfbArc(f)   (0 != ((f).fatr & FA_ARC))  /*  archive   */
  3723.   #define FfbDev(f)   (0 != ((f).fatr & FA_DEV))  /*  device    */
  3724.   #define FfbTim(f)   ((f).ftim)              /* packed time    */
  3725.   #define FfbDat(f)   ((f).fdat)              /* packed date    */
  3726.   #define FfbSiz(f)   ((f).fsiz)              /* file size      */
  3727.   #define FfbNam(f)   ((f).fnam)              /* file name      */
  3728.   #define FfbDot(f)   ((f).fnam[0]=='.')      /*    '.' or '..' */
  3729.                                               /* parent dir     */
  3730.   #define FfbPar(f)   (FfbDot(f) && ((f).fnam[1] == '.'))
  3731.  
  3732.  
  3733. ---------------------------------------------------------------------------
  3734.  
  3735.                           Video Access Subsystem
  3736.  
  3737.  
  3738. ---------------------------------------------------------------------------
  3739.  
  3740. NAME........._VidCtl
  3741.  
  3742. DESCRIPTION
  3743.      This structure  is used  to control all video accesses.  Macros are
  3744.      declared in  TCXLVID.H that  are used to access the various members
  3745.      of this structure.
  3746.  
  3747. DECLARATION
  3748.  
  3749.   GBL   VctlT  CDC _VidCtl;             /* global video-control */
  3750.  
  3751.  
  3752. EQUATES
  3753.   #define   V_NONE          0x00      /* adapter types returned */
  3754.   #define   V_MDA           0x01      /* ... by vidtype()       */
  3755.   #define   V_EGAMONO       0x02
  3756.   #define   V_MCGAMONO      0x03
  3757.   #define   V_VGAMONO       0x04
  3758.   #define   V_HGC           0x05
  3759.   #define   V_HGCPLUS       0x06
  3760.   #define   V_INCOLOR       0x07
  3761.   #define   V_CGA           0x08
  3762.   #define   V_EGA           0x09
  3763.   #define   V_MCGA          0x0A
  3764.   #define   V_VGA           0x0B
  3765.  
  3766.  
  3767.  
  3768.  
  3769.  
  3770.  
  3771.  
  3772. Page 60                                     TesSeRact CXL V5.5 User's Guide
  3773.                     /* video parameter settings */
  3774.   #define   VP_DMA  0x00       /* direct screen writes          */
  3775.   #define   VP_CGA  0x01       /* direct screen writes, no snow */
  3776.   #define   VP_BIO  0x02       /* BIOS screen writes            */
  3777.   #define   VP_MON  0x03       /* monochrome translate on       */
  3778.   #define   VP_COL  0x04       /* monochrome translate off      */
  3779.  
  3780.                     /* video-flag bits */
  3781.   #define   VF_MON  0x01              /* monochrome adapter     */
  3782.   #define   VF_MAP  0x02              /* map to mono attributes */
  3783.   #define   VF_CGA  0x04              /* suppress CGA snow      */
  3784.   #define   VF_BIO  0x08              /* use video BIOS         */
  3785.   #define   VF_DQV  0x10              /* DesqView installed     */
  3786.  
  3787.                     /*  Ultravision Flags */
  3788.   #define   VU_RES  0x80             /* Ultravision is resident */
  3789.   #define   VU_ACT  0x40              /* Ultravision is active  */
  3790.  
  3791.                     /* Ultravision Card Codes */
  3792.   #define   VU_GEC  0x00      /* Generic EGA w/ Color monitor   */
  3793.   #define   VU_GEM  0x04      /* Generic EGA w/ Mono monitor    */
  3794.   #define   VU_GVV  0x05      /* Generic VGA w/ VGA monitor     */
  3795.   #define   VU_PVV  0x06      /* Paradise VGA w/VGA monitor     */
  3796.   #define   VU_HVV  0x07      /* Super VGA w/VGA monitor        */
  3797.   #define   VU_BEE  0x0A      /* UV EGA Booster w/EGA monitor   */
  3798.   #define   VU_NEE  0x0B      /* NEC GB-1 w/EGA monitor         */
  3799.   #define   VU_SEE  0x0C      /* Genoa SuperEGA w/EGA monitor   */
  3800.   #define   VU_AEE  0x0D      /* Alt EGA Booster w/EGA monitor  */
  3801.   #define   VU_AEM  0x0E      /* Alt EGA Booster w/Mono monitor */
  3802.   #define   VU_GVA  0x19      /* Generic VGA w/Auto monitor     */
  3803.   #define   VU_PVA  0x1A      /* Paradise VGA w/Auto monitor    */
  3804.   #define   VU_HVA  0x1B      /* Super VGA w/Auto monitor       */
  3805.   #define   VU_BEA  0x14      /* UV EGA Booster w/Auto monitor  */
  3806.   #define   VU_NEA  0x15      /* NEC GB-1 w/Auto monitor        */
  3807.   #define   VU_SEA  0x16      /* Genoa SuperEGA w/Auto monitor  */
  3808.   #define   VU_AEA  0x17      /* Alt EGA Booster w/Auto monitor */
  3809.  
  3810.  
  3811.  
  3812.  
  3813.  
  3814.  
  3815.  
  3816.  
  3817.  
  3818.  
  3819.  
  3820.  
  3821.  
  3822.  
  3823.  
  3824.  
  3825.  
  3826.  
  3827.  
  3828.  
  3829.  
  3830.  
  3831. TesSeRact CXL V5.5 User's Guide                                     Page 61
  3832.                                      /* Ultravision Video Modes */
  3833.   #define   VU_A25  0x11     /* 80x25                           */
  3834.   #define   VU_A43  0x12     /* 80x43 on EGA, 80x50 on VGA      */
  3835.   #define   VU_A34  0x13     /* 80x34 on EGA, 80x36 on VGA      */
  3836.   #define   VU_A60  0x14     /* 80x60 on EGA, 80x63 on VGA      */
  3837.   #define   VU_B25  0x19     /* 94x25                           */
  3838.   #define   VU_B43  0x1A     /* 94x43 on EGA, 94x50 on VGA      */
  3839.   #define   VU_B36  0x1B     /* 94x36                           */
  3840.   #define   VU_B63  0x1C     /* 94x63                           */
  3841.   #define   VU_C25  0x21     /* 108x25                          */
  3842.   #define   VU_C43  0x22     /* 108x43 on EGA, 108x50 on VGA    */
  3843.   #define   VU_C34  0x23     /* 108x34 on EGA, 108x36 on VGA    */
  3844.   #define   VU_C60  0x24     /* 108x60 on EGA, 108x63 on VGA    */
  3845.   #define   VU_D25  0x31     /* 120x25                          */
  3846.   #define   VU_D43  0x32     /* 120x43 on EGA, 120x50 on VGA    */
  3847.   #define   VU_D36  0x39     /* 120x36                          */
  3848.   #define   VU_D63  0x3A     /* 120x63                          */
  3849.   #define   VU_E25  0x33     /* 132x25                          */
  3850.   #define   VU_E44  0x34     /* 132x44, 132x50 on SuperVGA only */
  3851.   #define   VU_E36  0x3B     /* 132x36                          */
  3852.   #define   VU_E60  0x3C     /* 132x60                          */
  3853.  
  3854. ACCESS MACROS
  3855.   #define VidSeg  (_VidCtl.vseg)              /* buffer segment */
  3856.   #define VidHdw  (_VidCtl.vhdw)              /* adapter type   */
  3857.   #define VidMod  (_VidCtl.vmod)              /* display mode   */
  3858.   #define VidFlg  (_VidCtl.vflg)              /* flags          */
  3859.   #define VidMon  (0 != (VidFlg & VF_MON))    /*    monochrome  */
  3860.   #define VidMap  (0 != (VidFlg & VF_MAP))    /*    map to mono */
  3861.   #define VidCga  (0 != (VidFlg & VF_CGA))    /*    CGA snow    */
  3862.   #define VidBio  (0 != (VidFlg & VF_BIO))    /*    use BIOS    */
  3863.   #define VidDqv  (0 != (VidFlg & VF_DQV))    /*    DesQview    */
  3864.   #define VidPag  (_VidCtl.vpag)              /* display page   */
  3865.   #define VidWid  (_VidCtl.vwid)              /* columns wide   */
  3866.   #define VidDep  (_VidCtl.vdep)              /* rows deep      */
  3867.   #define VidCur  (_VidCtl.vcur)              /* cursor save    */
  3868.   #define VidUvf  (_VidCtl.vuvf)              /* UV flags       */
  3869.   #define VuvRes  (0 != (VidUvf & VU_RES))    /*    resident    */
  3870.   #define VuvAct  (0 != (VidUvf & VU_ACT))    /*    active      */
  3871.   #define VidUvc  (_VidCtl.vuvc)              /* UV card code   */
  3872.   #define VidUvm  (_VidCtl.vuvm)              /* UV text mode   */
  3873.  
  3874.  
  3875. OTHER RELATED MACROS
  3876.   #define VcelW(x)    ((x).cwrd)      /* video cell as word     */
  3877.   #define VcelC(x)    ((x).c.chr)     /*     character          */
  3878.   #define VcelA(x)    ((x).c.atr)     /*     attribute          */
  3879.  
  3880.   #define VcseW(x)    ((x).cwrd)      /* video cursor as word   */
  3881.   #define VcseE(x)    ((x).c.end)     /*     cursor stop line   */
  3882.   #define VcseB(x)    ((x).c.beg)     /*     cursor start line  */
  3883.  
  3884.   #define VposW(x)    ((x).pwrd)      /* video position as word */
  3885.   #define VposC(x)    ((x).p.col)     /*     column position    */
  3886.   #define VposR(x)    ((x).p.row)     /*     row position       */
  3887.  
  3888.  
  3889.  
  3890. Page 62                                     TesSeRact CXL V5.5 User's Guide
  3891. ---------------------------------------------------------------------------
  3892.  
  3893.                          Keyboard Access Subsystem
  3894.  
  3895.  
  3896. ---------------------------------------------------------------------------
  3897.  
  3898. NAME........._KeyCtl
  3899.      _KeyQue
  3900.  
  3901. DESCRIPTION
  3902.      This structure  is used  for  all  input  (keyboard/mouse)  control
  3903.      throughout TCXL.  Macros are declared in TCXLKEY.H that are used to
  3904.      access the  various members  of this  structure.  The global buffer
  3905.      _KeyQue holds the internal keyboard ring buffer.
  3906.  
  3907. DECLARATION
  3908.   GBL       KctlT   CDC _KeyCtl;   /* global key-control object */
  3909.  
  3910.   GBL       KeyT    CDC _KeyQue[];          /* global key-queue */
  3911.  
  3912. EQUATES
  3913.   #define   KEY_RSH 0x01               /* [right shift] pressed */
  3914.   #define   KEY_LSH 0x02               /* [left shift] pressed  */
  3915.   #define   KEY_CTL 0x04               /* [Ctrl] pressed        */
  3916.   #define   KEY_ALT 0x08               /* [Alt] pressed         */
  3917.   #define   KEY_SCR 0x10               /* [Scroll Lock] toggled */
  3918.   #define   KEY_NUM 0x20               /* [Num Lock] toggled    */
  3919.   #define   KEY_CAP 0x40               /* [Caps Lock] toggled   */
  3920.   #define   KEY_INS 0x80               /* [Ins] toggled         */
  3921.  
  3922.   #define   KEY_EXT 0x80          /* KctlFlg extended functions */
  3923.   #define   KEY_MNU 0x01          /* KctlFlg currently in menu  */
  3924.   #define   KEY_SYS 0x02          /* KctlFlg internal usage     */
  3925.   #define   KEY_KBD 0x00          /* KctlSrc keyboard           */
  3926.   #define   KEY_QUE 0x01          /* KctlSrc key-queue          */
  3927.   #define   KEY_MOU 0x02          /* KctlSrc mouse              */
  3928.  
  3929.   #define   KEY_MAX 128           /* size of key-queue          */
  3930.   #define   KEY_BRK 0xFFFF        /* Ctrl-Brk ret from _KeyGet  */
  3931.  
  3932.  
  3933.  
  3934.  
  3935.  
  3936.  
  3937.  
  3938.  
  3939.  
  3940.  
  3941.  
  3942.  
  3943.  
  3944.  
  3945.  
  3946.  
  3947.  
  3948.  
  3949. TesSeRact CXL V5.5 User's Guide                                     Page 63
  3950. ACCESS MACROS
  3951.   #define   KctlFlg (_KeyCtl.kflg)             /* control-flag  */
  3952.   #define   KctlMnu (0 != (KctlFlg & KEY_MNU)) /* in-menu       */
  3953.   #define   KctlExt (0 != (KctlFlg & KEY_EXT)) /* extended      */
  3954.   #define   KctlSrc (0 != (KctlFlg & KEY_SYS)) /* internal      */
  3955.   #define   KctlSrc (_KeyCtl.ksrc)             /* keycode-source*/
  3956.   #define   KctlKbd (KctlSrc == KEY_KBD)       /* keyboard      */
  3957.   #define   KctlQue (KctlSrc == KEY_QUE)       /* key-queue     */
  3958.   #define   KctlMou (KctlSrc == KEY_MOU)       /* mouse         */
  3959.   #define   KctlBeg (_KeyCtl.kbeg)             /* queue-head    */
  3960.   #define   KctlEnd (_KeyCtl.kend)             /* queue-tail    */
  3961.   #define   KctlCnt (_KeyCtl.kcnt)             /* queue-count   */
  3962.   #define   KctlMax (_KeyCtl.kmax)             /* queue-size    */
  3963.   #define   KctlBas (_KeyCtl.kbas)             /* queue-base    */
  3964.   #define   KctlBnd (_KeyCtl.kbnd)             /* binding list  */
  3965.   #define   KctlIdl (_KeyCtl.kidl)             /* idle function */
  3966.   #define   KctlHlp (_KeyCtl.khlp)             /* help keycode  */
  3967.   #define   KctlFun (_KeyCtl.kfun)             /* help function */
  3968.  
  3969. OTHER RELATED MACROS
  3970.   #define   KcodKey(x)      ((x).ckey)                  /* Kcod */
  3971.   #define   KcodAsc(x)      ((x).c.asc)
  3972.   #define   KcodScn(x)      ((x).c.scn)
  3973.   #define   KbndPtr(b)      ((b)->bptr)                 /* Kbnd */
  3974.   #define   KbndFun(b)      ((b)->bfun)
  3975.   #define   KbndKey(b)      ((b)->bkey)
  3976.   #define   KbndRtn(b)      ((b)->brtn)
  3977.  
  3978.  
  3979.  
  3980. ---------------------------------------------------------------------------
  3981.  
  3982.                           Mouse Access Subsystem
  3983.  
  3984.  
  3985. ---------------------------------------------------------------------------
  3986.  
  3987. NAME........._MouCtl
  3988.  
  3989. DESCRIPTION
  3990.      This structure  is used  to control  all mouse  input.   Macros are
  3991.      declared in  TCXLMOU.H that  are used to access the various members
  3992.      of this structure.
  3993.  
  3994. DECLARATION
  3995.  
  3996.   GBL   MouT   CDC _MouCtl;             /* global mouse-control */
  3997.  
  3998.  
  3999. EQUATES
  4000.   #define   MOU_NONE        0x00          /* no mouse support   */
  4001.   #define   MOU_KEYS        0x01          /* emulate arrow keys */
  4002.   #define   MOU_CURS        0x02          /* free-moving cursor */
  4003.   #define   MOU_FULL        0x03          /* full mouse support */
  4004.   #define   MOU_3BTN        0x40          /* 3-button mouse     */
  4005.   #define   MOU_INIT        0x80          /* mouse initialized  */
  4006.  
  4007.  
  4008. Page 64                                     TesSeRact CXL V5.5 User's Guide
  4009. ACCESS MACROS
  4010.   #define   MouLvl  (_MouCtl.mlvl)             /* head level    */
  4011.   #define   MouNone (0 == (MouLvl & MOU_FULL)) /*    support off*/
  4012.   #define   MouKeys (0 != (MouLvl & MOU_KEYS)) /*    arrow      */
  4013.   #define   MouCurs (0 != (MouLvl & MOU_CURS)) /*    free       */
  4014.   #define   MouFull (0 != (MouLvl & MOU_FULL)) /*    full       */
  4015.   #define   MouCol  (_MouCtl.mcol)             /* head column   */
  4016.   #define   MouRow  (_MouCtl.mrow)             /* head row      */
  4017.   #define   MouFlg  (_MouCtl.mflg)             /* global flags  */
  4018.   #define   MouInit (0 != (MouFlg & MOU_INIT)) /*    initialized*/
  4019.   #define   Mou3btn (0 != (MouFlg & MOU_3BTN)) /*    3-button   */
  4020.   #define   MouBtn  (_MouCtl.mbtn)             /* button-status */
  4021.   #define   MouLeft (0 != MouBtn & 0x01)       /*    left       */
  4022.   #define   MouRght (0 != MouBtn & 0x02)       /*    right      */
  4023.   #define   MouCent (0 != MouBtn & 0x04)       /*    center     */
  4024.   #define   MouCnt  (_MouCtl.mcnt)             /* button-count  */
  4025.   #define   MouHor  (_MouCtl.mhor)             /* horiz. motion */
  4026.   #define   MouVer  (_MouCtl.mver)             /* vert. motion  */
  4027.   #define   MouLkey (_MouCtl.mlkc)             /* left keycode  */
  4028.   #define   MouRkey (_MouCtl.mrkc)             /* right keycode */
  4029.   #define   MouMkey (_MouCtl.mmkc)             /* middle keycode*/
  4030.  
  4031.  
  4032. ---------------------------------------------------------------------------
  4033.  
  4034.                          Format Control Subsystem
  4035.  
  4036.  
  4037. NAME........._FmtCtl
  4038.  
  4039. DESCRIPTION
  4040.      This structure  is used  to hold  all the information pertaining to
  4041.      formatted input  and validation.   Macros are declared in TCXLfmt.h
  4042.      to access this variable.
  4043.  
  4044. DECLARATION
  4045.  
  4046.   GBL FmtT CDC _FmtCtl;           /* global format-control object */
  4047.  
  4048.  
  4049. EQUATES
  4050.                     /* Format Escapes */
  4051.   #define   FMT_CPY 0x01                /* 'C'  copy to output  */
  4052.   #define   FMT_ESC 0x02                /* 'E'  [Esc] detect    */
  4053.   #define   FMT_RTN 0x04                /* 'R'  [CR] detect     */
  4054.   #define   FMT_PAS 0x08                /* 'P'  password        */
  4055.   #define   FMT_LWR 0x10                /* 'L'  lower case      */
  4056.   #define   FMT_MIX 0x20                /* 'M'  mixed case      */
  4057.   #define   FMT_UPR 0x40                /* 'U'  upper case      */
  4058.   #define   FMT_CNV 0x70                /* 'L|M|U'  convert     */
  4059.   #define   FMT_END 0x80                /* end-of-format        */
  4060.   #define   FMT_TRM 0x84                /* end | 'R'  terminate */
  4061.   #define   FMT_INI 0x06                /* 'E|R'  initial       */
  4062.  
  4063.  
  4064.  
  4065.  
  4066.  
  4067. TesSeRact CXL V5.5 User's Guide                                     Page 65
  4068.                     /* Format Usages */
  4069.   #define   FMT_GET 0x00                /* FmtGet()             */
  4070.   #define   FMT_WIN 0x01                /* WFmtGet()            */
  4071.   #define   FMT_ENT 0x02                /* EntFld()             */
  4072.   #define   FMT_NUM 0x04                /*    decimal field     */
  4073.   #define   FMT_CUR 0x08                /*    currency field    */
  4074.  
  4075.  
  4076. ACCESS MACROS
  4077.   #define FmtTgl  (_FmtCtl.ftgl)        /* option chars         */
  4078.   #define FmtChr  (_FmtCtl.fchr)        /* control chars        */
  4079.   #define FmtPut  (_FmtCtl.fput)        /* backspace function   */
  4080.   #define FmtLen  (_FmtCtl.flen)        /* field length         */
  4081.   #define FmtDec  (_FmtCtl.fdec)        /* decimal position     */
  4082.   #define FmtOpt  (_FmtCtl.fopt)        /* option state         */
  4083.   #define FmtCpy  (0 != (FmtOpt & FMT_CPY))  /*  copy to output */
  4084.   #define FmtEsc  (0 != (FmtOpt & FMT_ESC))  /*  [Esc] detect   */
  4085.   #define FmtRtn  (0 != (FmtOpt & FMT_RTN))  /*  [CR] detect    */
  4086.   #define FmtPas  (0 != (FmtOpt & FMT_PAS))  /*  password       */
  4087.   #define FmtLwr  (0 != (FmtOpt & FMT_LWR))  /*  lower case     */
  4088.   #define FmtMix  (0 != (FmtOpt & FMT_MIX))  /*  mixed case     */
  4089.   #define FmtUpr  (0 != (FmtOpt & FMT_UPR))  /*  upper case     */
  4090.   #define FmtCnv  (0 != (FmtOpt & FMT_CNV))  /*  convert        */
  4091.   #define FmtEnd  (0 != (FmtOpt & FMT_END))  /*  end-of-format  */
  4092.   #define FmtTrm  (0 != (FmtOpt & FMT_TRM))  /*  terminate      */
  4093.   #define FmtUse  (_FmtCtl.fuse)        /* usage state          */
  4094.   #define FmtGet  (FmtUse == FMT_GET)   /*   FmtGet()           */
  4095.   #define FmtWin  (FmtUse == FMT_WIN)   /*   WFmtGet()          */
  4096.   #define FmtEnt  (FmtUse == FMT_ENT)   /*   EntFld()           */
  4097.   #define FmtNum  (0 != (FmtUse & FMT_NUM))  /* decimal         */
  4098.   #define FmtCur  (0 != (FmtUse & FMT_CUR))  /* currency        */
  4099.   #define FmtPfx  (_FmtCtl.fpfx)             /* currency prefix */
  4100.   #define FmtSep  (_FmtCtl.fsep)          /* currency separator */
  4101.   #define FmtSfx  (_FmtCtl.fsfx)             /* currency suffix */
  4102.  
  4103.  
  4104.  
  4105.  
  4106.  
  4107.  
  4108.  
  4109.  
  4110.  
  4111.  
  4112.  
  4113.  
  4114.  
  4115.  
  4116.  
  4117.  
  4118.  
  4119.  
  4120.  
  4121.  
  4122.  
  4123.  
  4124.  
  4125.  
  4126. Page 66                                     TesSeRact CXL V5.5 User's Guide
  4127.                        COPYRIGHT NOTICE AND LICENSE
  4128.  
  4129. Innovative Data Concepts, hereby licenses you to: use the software; make as
  4130. many copies  of the shareware version of this software and documentation as
  4131. you wish;  give exact  copies of  the original shareware version to anyone;
  4132. and distribute  the shareware  version of the software and documentation in
  4133. its unmodified form via electronic means. There is no charge for any of the
  4134. above.
  4135.  
  4136. This is  not free  software.   This license  allows you  to  evaluate  this
  4137. software without  charge for  a period of 30 days.  Any use of this product
  4138. past this 30-day period is in violation of international copyright laws and
  4139. will be prosecuted.
  4140.  
  4141. No copy  of the  software may  be distributed  or given  away without  this
  4142. accompanying documentation  in machine-readable  form; this notice must not
  4143. be removed.  ONLY COPIES OF THE SHAREWARE VERSION MAY BE DISTRIBUTED IN ANY
  4144. FORM.   IDC will  provide disks  with the  shareware versions  of ALL  SWAP
  4145. Utilities programs upon written request.
  4146.  
  4147.  
  4148.                                  Warranty
  4149.  
  4150. There is  no warranty  of any  kind associated  with this software, and the
  4151. copyright owner  is not  liable for  damages of  any kind.   By  using this
  4152. software, you  agree to this. Every effort has been made by Innovative Data
  4153. Concepts to  make this  product bug-free.   However, the nature of software
  4154. development is  that it  is impossible to guarantee bug-free software. If a
  4155. user reports  a verifiable  problem, IDC  will make  every best  effort  to
  4156. correct it.
  4157.  
  4158.  
  4159.  
  4160.  
  4161.  
  4162.  
  4163.  
  4164.  
  4165.  
  4166.  
  4167.  
  4168.  
  4169.  
  4170.  
  4171.  
  4172.  
  4173.  
  4174.  
  4175.  
  4176.  
  4177.  
  4178.  
  4179.  
  4180.  
  4181.  
  4182.  
  4183.  
  4184.  
  4185. TesSeRact CXL V5.5 User's Guide                                     Page 67
  4186.